using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace SqlSugar { public interface IUpdateable where T : class, new() { UpdateBuilder UpdateBuilder { get; set; } bool UpdateParameterIsNull { get; set; } int ExecuteCommand(); bool ExecuteCommandHasChange(); Task ExecuteCommandAsync(); Task ExecuteCommandHasChangeAsync(); IUpdateable AS(string tableName); IUpdateable With(string lockString); IUpdateable Where(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(string [] columnNames); /// /// .UpdateColumns(it=>new{ it.Name,it.Price}) /// /// /// IUpdateable UpdateColumns(Expression> columns); IUpdateable UpdateColumns(params string[] columns); /// ///.SetColumns(it=>it.Name=="a") /// /// /// IUpdateable SetColumns(Expression> columns); /// /// .SetColumns(it=> new class() { it.Name="a",it.Price=0}) /// /// /// IUpdateable SetColumns(Expression> columns); 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 IgnoreColumns(params string[] columns); IUpdateable IsEnableUpdateVersionValidation(); IUpdateable EnableDiffLogEvent(object businessData = null); IUpdateable ReSetValue(Expression> setValueExpression); IUpdateable RemoveDataCache(); KeyValuePair> ToSql(); void AddQueue(); #region delete obj [Obsolete("Use IUpdateable UpdateColumns(string [] columns)")] IUpdateable UpdateColumns(Func updateColumMethod); [Obsolete("Use IUpdateable IgnoreColumns(string [] columns)")] IUpdateable IgnoreColumns(Func ignoreColumMethod); [Obsolete("Use IUpdateable IgnoreColumns(bool ignoreAllNullColumns, bool isOffIdentity = false);")] IUpdateable Where(bool isNoUpdateNull, bool IsOffIdentity = false); [Obsolete("Use IUpdateable UpdateColumnsIF(bool isUpdateColumns,string [] columns")] IUpdateable UpdateColumnsIF(bool isUpdateColumns, Func updateColumMethod); [Obsolete("Use SetColumns(Expression> columns)")] IUpdateable UpdateColumns(Expression> columns); [Obsolete("Use SetColumns(Expression> columns")] IUpdateable UpdateColumns(Expression> columns); [Obsolete("Use SetColumnsIF(bool isUpdateColumns, Expression> columns)")] IUpdateable UpdateColumnsIF(bool isUpdateColumns, Expression> columns); [Obsolete("Use SetColumnsIF(bool isUpdateColumns, Expression> columns")] IUpdateable UpdateColumnsIF(bool isUpdateColumns, Expression> columns); #endregion } }