using NetTaste; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Security.Permissions; using System.Text; using System.Threading; using System.Threading.Tasks; namespace SqlSugar { public interface IUpdateable where T : class, new() { UpdateBuilder UpdateBuilder { get; set; } bool UpdateParameterIsNull { get; set; } int ExecuteCommandWithOptLock(bool isThrowError = false); int ExecuteCommandWithOptLockIF(bool? IsVersionValidation, bool? IsOptLock = null); Task ExecuteCommandWithOptLockAsync(bool isThrowError = false); int ExecuteCommand(); bool ExecuteCommandHasChange(); Task ExecuteCommandAsync(); Task ExecuteCommandAsync(CancellationToken token); Task ExecuteCommandHasChangeAsync(); Task ExecuteCommandHasChangeAsync(CancellationToken token); IUpdateable AS(string tableName); IUpdateable AsType(Type tableNameType); IUpdateable With(string lockString); IUpdateable In(Expression> inField, ISugarQueryable childQueryExpression); IUpdateable Where(Expression> expression); IUpdateable WhereIF(bool isWhere,Expression> expression); IUpdateable Where(string whereSql,object parameters=null); /// /// /// /// /// for example : = /// /// IUpdateable Where(string fieldName, string conditionalType, object fieldValue); /// /// Non primary key entity update function,.WhereColumns(it=>new{ it.Id }) /// /// /// IUpdateable WhereColumns(Expression> columns); IUpdateable WhereColumns(string columnName); IUpdateable WhereColumns(params string [] columnNames); IUpdateable Where(List conditionalModels); /// /// .UpdateColumns(it=>new{ it.Name,it.Price}) /// /// /// IUpdateable UpdateColumns(Expression> columns); IUpdateable UpdateColumns(Expression> columns, bool appendColumnsByDataFilter); IUpdateable UpdateColumns(params string[] columns); IUpdateable UpdateColumns(string[] columns,bool appendColumnsByDataFilter); /// ///.SetColumns(it=>it.Name=="a") /// /// /// IUpdateable SetColumns(Expression> columns); /// /// .SetColumns(it=> new class() { it.Name="a",it.Price=0}) /// /// /// IUpdateable SetColumns(Expression> columns); IUpdateable SetColumns(Expression> columns,bool appendColumnsByDataFilter); IUpdateable SetColumns(string fieldName,object fieldValue); IUpdateable SetColumns(Expression> filedNameExpression, object fieldValue); IUpdateable SetColumns(Expression> filedNameExpression, Expression> valueExpression); IUpdateable SetColumnsIF(bool isUpdateColumns, Expression> filedNameExpression, object fieldValue); IUpdateable UpdateColumnsIF(bool isUpdateColumns,Expression> columns); IUpdateable UpdateColumnsIF(bool isUpdateColumns, params string[] columns); IUpdateable SetColumnsIF(bool isUpdateColumns,Expression> columns); IUpdateable SetColumnsIF(bool isUpdateColumns, Expression> columns); IUpdateable IgnoreColumns(bool ignoreAllNullColumns, bool isOffIdentity = false, bool ignoreAllDefaultValue = false); IUpdateable IgnoreColumns(Expression> columns); IUpdateable IgnoreColumnsIF(bool isIgnore, Expression> columns); IUpdateable IgnoreColumns(params string[] columns); IUpdateable IgnoreNullColumns(bool isIgnoreNull=true); IUpdateable IsEnableUpdateVersionValidation(); IUpdateable EnableDiffLogEvent(object businessData = null); IUpdateable EnableDiffLogEventIF(bool isEnableDiffLog,object businessData = null); IUpdateable ReSetValue(Action setValueExpression); IUpdateable PublicSetColumns(Expression> filedNameExpression,string computationalSymbol); IUpdateable PublicSetColumns (Expression> filedNameExpression, Expression> ValueExpExpression); IUpdateable RemoveDataCache(); IUpdateable RemoveDataCache(string likeString); IUpdateable CallEntityMethod(Expression> method); KeyValuePair> ToSql(); string ToSqlString(); void AddQueue(); SplitTableUpdateProvider SplitTable(Func, IEnumerable> getTableNamesFunc); SplitTableUpdateByObjectProvider SplitTable(); IUpdateable EnableQueryFilter(); IUpdateable Clone(); IUpdateable InnerJoin(Expression> joinExpress); IUpdateable InnerJoin(Expression> joinExpress,string tableName); IUpdateable InnerJoin(ISugarQueryable queryable,Expression> joinExpress); UpdateablePage PageSize(int pageSize); IUpdateable In(object[] ids); ParameterUpdateable UseParameter(); } public interface IUpdateable { int ExecuteCommand(); Task ExecuteCommandAsync(); IUpdateable InnerJoin(Expression> joinExpress); IUpdateable SetColumns(Expression> columns); IUpdateable Where(Expression> whereExpression); } public interface IUpdateable { IUpdateable InnerJoin(Expression> joinExpress); int ExecuteCommand(); Task ExecuteCommandAsync(); IUpdateable SetColumns(Expression> columns); IUpdateable Where(Expression> whereExpression); } public interface IUpdateable { int ExecuteCommand(); Task ExecuteCommandAsync(); IUpdateable SetColumns(Expression> columns); IUpdateable Where(Expression> whereExpression); } }