Class UpdateProvider<T1>
Inheritance
System.Object
UpdateProvider<T1>
Inherited Members
UpdateProvider.ExecuteBulkCommand<T1>(List<T1>, ColumnInfo[], IFreeSql, DbConnection, DbTransaction, TableInfo, NativeTuple<String, String, String, String, String[]>, Action<IInsert<T1>>)
UpdateProvider.ExecuteBulkCommandAsync<T1>(List<T1>, ColumnInfo[], IFreeSql, DbConnection, DbTransaction, TableInfo, NativeTuple<String, String, String, String, String[]>, Func<IInsert<T1>, Task>)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FreeSql.dll
Syntax
public abstract class UpdateProvider<T1> : UpdateProvider, IUpdate<T1>
Type Parameters
Constructors
|
Improve this Doc
View Source
UpdateProvider(IFreeSql, CommonUtils, CommonExpression, Object)
Declaration
public UpdateProvider(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, object dywhere)
Parameters
Fields
|
Improve this Doc
View Source
_batchProgress
Declaration
public Action<BatchProgressStatus<T1>> _batchProgress
Field Value
|
Improve this Doc
View Source
_source
Declaration
Field Value
| Type |
Description |
| System.Collections.Generic.List<T1> |
|
|
Improve this Doc
View Source
_sourceOld
Declaration
public List<T1> _sourceOld
Field Value
| Type |
Description |
| System.Collections.Generic.List<T1> |
|
Methods
|
Improve this Doc
View Source
AsTable(Func<String, String>)
Declaration
public IUpdate<T1> AsTable(Func<string, string> tableRule)
Parameters
| Type |
Name |
Description |
| System.Func<System.String, System.String> |
tableRule |
|
Returns
|
Improve this Doc
View Source
AsTable(String)
Declaration
public IUpdate<T1> AsTable(string tableName)
Parameters
| Type |
Name |
Description |
| System.String |
tableName |
|
Returns
|
Improve this Doc
View Source
AsType(Type)
Declaration
public IUpdate<T1> AsType(Type entityType)
Parameters
| Type |
Name |
Description |
| System.Type |
entityType |
|
Returns
|
Improve this Doc
View Source
AuditDataValue(Object, T1, IFreeSql, TableInfo, Dictionary<String, Boolean>)
Declaration
public static void AuditDataValue(object sender, T1 data, IFreeSql orm, TableInfo table, Dictionary<string, bool> changedDict)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
| T1 |
data |
|
| IFreeSql |
orm |
|
| TableInfo |
table |
|
| System.Collections.Generic.Dictionary<System.String, System.Boolean> |
changedDict |
|
|
Improve this Doc
View Source
AuditDataValue(Object, IEnumerable<T1>, IFreeSql, TableInfo, Dictionary<String, Boolean>)
Declaration
public static void AuditDataValue(object sender, IEnumerable<T1> data, IFreeSql orm, TableInfo table, Dictionary<string, bool> changedDict)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
| System.Collections.Generic.IEnumerable<T1> |
data |
|
| IFreeSql |
orm |
|
| TableInfo |
table |
|
| System.Collections.Generic.Dictionary<System.String, System.Boolean> |
changedDict |
|
|
Improve this Doc
View Source
BatchOptions(Int32, Int32, Boolean)
Declaration
public virtual IUpdate<T1> BatchOptions(int rowsLimit, int parameterLimit, bool autoTransaction = true)
Parameters
| Type |
Name |
Description |
| System.Int32 |
rowsLimit |
|
| System.Int32 |
parameterLimit |
|
| System.Boolean |
autoTransaction |
|
Returns
|
Improve this Doc
View Source
BatchProgress(Action<BatchProgressStatus<T1>>)
Declaration
public IUpdate<T1> BatchProgress(Action<BatchProgressStatus<T1>> callback)
Parameters
Returns
|
Improve this Doc
View Source
ClearData()
Declaration
protected void ClearData()
|
Improve this Doc
View Source
CommandTimeout(Int32)
Declaration
public IUpdate<T1> CommandTimeout(int timeout)
Parameters
| Type |
Name |
Description |
| System.Int32 |
timeout |
|
Returns
|
Improve this Doc
View Source
DisableGlobalFilter(String[])
Declaration
public IUpdate<T1> DisableGlobalFilter(params string[] name)
Parameters
| Type |
Name |
Description |
| System.String[] |
name |
|
Returns
|
Improve this Doc
View Source
ExecuteAffrows()
Declaration
public abstract int ExecuteAffrows()
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
ExecuteAffrowsAsync(CancellationToken)
Declaration
public abstract Task<int> ExecuteAffrowsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Int32> |
|
|
Improve this Doc
View Source
ExecuteUpdated()
Declaration
public abstract List<T1> ExecuteUpdated()
Returns
| Type |
Description |
| System.Collections.Generic.List<T1> |
|
|
Improve this Doc
View Source
ExecuteUpdatedAsync(CancellationToken)
Declaration
public abstract Task<List<T1>> ExecuteUpdatedAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<T1>> |
|
|
Improve this Doc
View Source
GetDictionaryTableInfo(T1, IFreeSql, ref TableInfo)
Declaration
public static void GetDictionaryTableInfo(T1 source, IFreeSql orm, ref TableInfo table)
Parameters
| Type |
Name |
Description |
| T1 |
source |
|
| IFreeSql |
orm |
|
| TableInfo |
table |
|
|
Improve this Doc
View Source
GetDictionaryTableInfo(IEnumerable<T1>, IFreeSql, ref TableInfo)
Declaration
public static void GetDictionaryTableInfo(IEnumerable<T1> source, IFreeSql orm, ref TableInfo table)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T1> |
source |
|
| IFreeSql |
orm |
|
| TableInfo |
table |
|
|
Improve this Doc
View Source
IgnoreCanUpdate()
AsType, Ctor, ClearData 三处地方需要重新加载
Declaration
protected void IgnoreCanUpdate()
|
Improve this Doc
View Source
IgnoreColumns(Expression<Func<T1, Object>>)
Declaration
public IUpdate<T1> IgnoreColumns(Expression<Func<T1, object>> columns)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, System.Object>> |
columns |
|
Returns
|
Improve this Doc
View Source
IgnoreColumns(String[])
Declaration
public IUpdate<T1> IgnoreColumns(string[] columns)
Parameters
| Type |
Name |
Description |
| System.String[] |
columns |
|
Returns
|
Improve this Doc
View Source
Join<T2>(ISelect<T2>, Expression<Func<T1, T2, Boolean>>)
Declaration
public IUpdateJoin<T1, T2> Join<T2>(ISelect<T2> query, Expression<Func<T1, T2, bool>> on)
where T2 : class
Parameters
| Type |
Name |
Description |
| ISelect<T2> |
query |
|
| System.Linq.Expressions.Expression<System.Func<T1, T2, System.Boolean>> |
on |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Join<T2>(Expression<Func<T1, T2, Boolean>>)
Declaration
public IUpdateJoin<T1, T2> Join<T2>(Expression<Func<T1, T2, bool>> on)
where T2 : class
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, T2, System.Boolean>> |
on |
|
Returns
Type Parameters
|
Improve this Doc
View Source
NoneParameter(Boolean)
Declaration
public IUpdate<T1> NoneParameter(bool isNotCommandParameter = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
isNotCommandParameter |
|
Returns
|
Improve this Doc
View Source
RawExecuteAffrows()
Declaration
protected int RawExecuteAffrows()
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
RawExecuteAffrowsAsync(CancellationToken)
Declaration
protected async Task<int> RawExecuteAffrowsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Int32> |
|
|
Improve this Doc
View Source
RawExecuteUpdated()
Declaration
protected abstract List<T1> RawExecuteUpdated()
Returns
| Type |
Description |
| System.Collections.Generic.List<T1> |
|
|
Improve this Doc
View Source
RawExecuteUpdatedAsync(CancellationToken)
Declaration
protected abstract Task<List<T1>> RawExecuteUpdatedAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<T1>> |
|
|
Improve this Doc
View Source
Set<TMember>(Expression<Func<T1, TMember>>)
Declaration
public IUpdate<T1> Set<TMember>(Expression<Func<T1, TMember>> exp)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, TMember>> |
exp |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Set<TMember>(Expression<Func<T1, TMember>>, TMember)
Declaration
public IUpdate<T1> Set<TMember>(Expression<Func<T1, TMember>> column, TMember value)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, TMember>> |
column |
|
| TMember |
value |
|
Returns
Type Parameters
|
Improve this Doc
View Source
SetDto(Object)
Declaration
public IUpdate<T1> SetDto(object dto)
Parameters
| Type |
Name |
Description |
| System.Object |
dto |
|
Returns
|
Improve this Doc
View Source
SetIf<TMember>(Boolean, Expression<Func<T1, TMember>>)
Declaration
public IUpdate<T1> SetIf<TMember>(bool condition, Expression<Func<T1, TMember>> exp)
Parameters
| Type |
Name |
Description |
| System.Boolean |
condition |
|
| System.Linq.Expressions.Expression<System.Func<T1, TMember>> |
exp |
|
Returns
Type Parameters
|
Improve this Doc
View Source
SetIf<TMember>(Boolean, Expression<Func<T1, TMember>>, TMember)
Declaration
public IUpdate<T1> SetIf<TMember>(bool condition, Expression<Func<T1, TMember>> column, TMember value)
Parameters
| Type |
Name |
Description |
| System.Boolean |
condition |
|
| System.Linq.Expressions.Expression<System.Func<T1, TMember>> |
column |
|
| TMember |
value |
|
Returns
Type Parameters
|
Improve this Doc
View Source
SetPriv(ColumnInfo, Object)
Declaration
protected void SetPriv(ColumnInfo col, object value)
Parameters
| Type |
Name |
Description |
| ColumnInfo |
col |
|
| System.Object |
value |
|
|
Improve this Doc
View Source
SetRaw(String, Object)
Declaration
public IUpdate<T1> SetRaw(string sql, object parms = null)
Parameters
| Type |
Name |
Description |
| System.String |
sql |
|
| System.Object |
parms |
|
Returns
|
Improve this Doc
View Source
SetSource(T1)
Declaration
public IUpdate<T1> SetSource(T1 source)
Parameters
| Type |
Name |
Description |
| T1 |
source |
|
Returns
|
Improve this Doc
View Source
SetSource(IEnumerable<T1>, Expression<Func<T1, Object>>, Boolean)
Declaration
public IUpdate<T1> SetSource(IEnumerable<T1> source, Expression<Func<T1, object>> tempPrimarys = null, bool ignoreVersion = false)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T1> |
source |
|
| System.Linq.Expressions.Expression<System.Func<T1, System.Object>> |
tempPrimarys |
|
| System.Boolean |
ignoreVersion |
|
Returns
|
Improve this Doc
View Source
SetSourceIgnore(T1, Func<Object, Boolean>)
Declaration
public IUpdate<T1> SetSourceIgnore(T1 source, Func<object, bool> ignore)
Parameters
| Type |
Name |
Description |
| T1 |
source |
|
| System.Func<System.Object, System.Boolean> |
ignore |
|
Returns
|
Improve this Doc
View Source
SplitExecuteAffrows(Int32, Int32)
Declaration
protected virtual int SplitExecuteAffrows(int valuesLimit, int parameterLimit)
Parameters
| Type |
Name |
Description |
| System.Int32 |
valuesLimit |
|
| System.Int32 |
parameterLimit |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
SplitExecuteAffrowsAsync(Int32, Int32, CancellationToken)
Declaration
protected virtual async Task<int> SplitExecuteAffrowsAsync(int valuesLimit, int parameterLimit, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Int32 |
valuesLimit |
|
| System.Int32 |
parameterLimit |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Int32> |
|
|
Improve this Doc
View Source
SplitExecuteUpdated(Int32, Int32)
Declaration
protected virtual List<T1> SplitExecuteUpdated(int valuesLimit, int parameterLimit)
Parameters
| Type |
Name |
Description |
| System.Int32 |
valuesLimit |
|
| System.Int32 |
parameterLimit |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<T1> |
|
|
Improve this Doc
View Source
SplitExecuteUpdatedAsync(Int32, Int32, CancellationToken)
Declaration
protected virtual async Task<List<T1>> SplitExecuteUpdatedAsync(int valuesLimit, int parameterLimit, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type |
Name |
Description |
| System.Int32 |
valuesLimit |
|
| System.Int32 |
parameterLimit |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<T1>> |
|
|
Improve this Doc
View Source
SplitSource(Int32, Int32, Boolean)
Declaration
protected List<T1>[] SplitSource(int valuesLimit, int parameterLimit, bool isAsTableSplited = false)
Parameters
| Type |
Name |
Description |
| System.Int32 |
valuesLimit |
|
| System.Int32 |
parameterLimit |
|
| System.Boolean |
isAsTableSplited |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<T1>[] |
|
|
Improve this Doc
View Source
TableRuleInvoke()
Declaration
protected string TableRuleInvoke()
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ToSql()
Declaration
public virtual string ToSql()
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ToSqlCase(StringBuilder, ColumnInfo[])
Declaration
protected abstract void ToSqlCase(StringBuilder caseWhen, ColumnInfo[] primarys)
Parameters
| Type |
Name |
Description |
| System.Text.StringBuilder |
caseWhen |
|
| ColumnInfo[] |
primarys |
|
|
Improve this Doc
View Source
ToSqlCaseWhenEnd(StringBuilder, ColumnInfo)
Declaration
protected virtual void ToSqlCaseWhenEnd(StringBuilder sb, ColumnInfo col)
Parameters
| Type |
Name |
Description |
| System.Text.StringBuilder |
sb |
|
| ColumnInfo |
col |
|
|
Improve this Doc
View Source
ToSqlExtension110(StringBuilder, Boolean)
Declaration
public virtual void ToSqlExtension110(StringBuilder sb, bool isAsTableSplited)
Parameters
| Type |
Name |
Description |
| System.Text.StringBuilder |
sb |
|
| System.Boolean |
isAsTableSplited |
|
|
Improve this Doc
View Source
ToSqlFetch(Action<StringBuilder>)
Declaration
public void ToSqlFetch(Action<StringBuilder> fetch)
Parameters
| Type |
Name |
Description |
| System.Action<System.Text.StringBuilder> |
fetch |
|
|
Improve this Doc
View Source
ToSqlFetchAsync(Func<StringBuilder, Task>)
Declaration
public async Task ToSqlFetchAsync(Func<StringBuilder, Task> fetchAsync)
Parameters
| Type |
Name |
Description |
| System.Func<System.Text.StringBuilder, System.Threading.Tasks.Task> |
fetchAsync |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
ToSqlWhen(StringBuilder, ColumnInfo[], Object)
Declaration
protected abstract void ToSqlWhen(StringBuilder sb, ColumnInfo[] primarys, object d)
Parameters
| Type |
Name |
Description |
| System.Text.StringBuilder |
sb |
|
| ColumnInfo[] |
primarys |
|
| System.Object |
d |
|
|
Improve this Doc
View Source
ToSqlWhere(StringBuilder)
Declaration
public virtual void ToSqlWhere(StringBuilder sb)
Parameters
| Type |
Name |
Description |
| System.Text.StringBuilder |
sb |
|
|
Improve this Doc
View Source
UpdateColumns(Expression<Func<T1, Object>>)
Declaration
public IUpdate<T1> UpdateColumns(Expression<Func<T1, object>> columns)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, System.Object>> |
columns |
|
Returns
|
Improve this Doc
View Source
UpdateColumns(String[])
Declaration
public IUpdate<T1> UpdateColumns(string[] columns)
Parameters
| Type |
Name |
Description |
| System.String[] |
columns |
|
Returns
|
Improve this Doc
View Source
ValidateVersionAndThrow(Int32, String, DbParameter[])
Declaration
protected void ValidateVersionAndThrow(int affrows, string sql, DbParameter[] dbParms)
Parameters
| Type |
Name |
Description |
| System.Int32 |
affrows |
|
| System.String |
sql |
|
| System.Data.Common.DbParameter[] |
dbParms |
|
|
Improve this Doc
View Source
Where(T1)
Declaration
public IUpdate<T1> Where(T1 item)
Parameters
| Type |
Name |
Description |
| T1 |
item |
|
Returns
|
Improve this Doc
View Source
Where(IEnumerable<T1>)
Declaration
public IUpdate<T1> Where(IEnumerable<T1> items)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<T1> |
items |
|
Returns
|
Improve this Doc
View Source
Where(Expression<Func<T1, Boolean>>)
Declaration
public IUpdate<T1> Where(Expression<Func<T1, bool>> exp)
Parameters
| Type |
Name |
Description |
| System.Linq.Expressions.Expression<System.Func<T1, System.Boolean>> |
exp |
|
Returns
|
Improve this Doc
View Source
Where(String, Object)
Declaration
public IUpdate<T1> Where(string sql, object parms = null)
Parameters
| Type |
Name |
Description |
| System.String |
sql |
|
| System.Object |
parms |
|
Returns
|
Improve this Doc
View Source
WhereCaseSource(String, Func<String, String>)
Declaration
protected string WhereCaseSource(string CsName, Func<string, string> thenValue)
Parameters
| Type |
Name |
Description |
| System.String |
CsName |
|
| System.Func<System.String, System.String> |
thenValue |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
WhereDynamic(Object, Boolean)
Declaration
public IUpdate<T1> WhereDynamic(object dywhere, bool not = false)
Parameters
| Type |
Name |
Description |
| System.Object |
dywhere |
|
| System.Boolean |
not |
|
Returns
|
Improve this Doc
View Source
WhereIf(Boolean, Expression<Func<T1, Boolean>>)
Declaration
public IUpdate<T1> WhereIf(bool condition, Expression<Func<T1, bool>> exp)
Parameters
| Type |
Name |
Description |
| System.Boolean |
condition |
|
| System.Linq.Expressions.Expression<System.Func<T1, System.Boolean>> |
exp |
|
Returns
|
Improve this Doc
View Source
WithConnection(DbConnection)
Declaration
public IUpdate<T1> WithConnection(DbConnection connection)
Parameters
| Type |
Name |
Description |
| System.Data.Common.DbConnection |
connection |
|
Returns
|
Improve this Doc
View Source
WithTransaction(DbTransaction)
Declaration
public IUpdate<T1> WithTransaction(DbTransaction transaction)
Parameters
| Type |
Name |
Description |
| System.Data.Common.DbTransaction |
transaction |
|
Returns
Implements