IDeleteable.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using System.Threading;
  7. using System.Threading.Tasks;
  8. namespace SqlSugar
  9. {
  10. public interface IDeleteable<T> where T : class, new()
  11. {
  12. DeleteBuilder DeleteBuilder { get; set; }
  13. int ExecuteCommand();
  14. bool ExecuteCommandHasChange();
  15. Task<int> ExecuteCommandAsync();
  16. Task<int> ExecuteCommandAsync(CancellationToken token);
  17. Task<bool> ExecuteCommandHasChangeAsync();
  18. IDeleteable<T> AS(string tableName);
  19. IDeleteable<T> AsType(Type tableNameType);
  20. IDeleteable<T> With(string lockString);
  21. IDeleteable<T> Where(T deleteObj);
  22. IDeleteable<T> WhereIF(bool isWhere, Expression<Func<T, bool>> expression);
  23. IDeleteable<T> Where(Expression<Func<T, bool>> expression);
  24. IDeleteable<T> Where(List<T> deleteObjs);
  25. DeleteablePage<T> PageSize(int pageSize);
  26. IDeleteable<T> In<PkType>(PkType primaryKeyValue);
  27. IDeleteable<T> In<PkType>(PkType[] primaryKeyValues);
  28. IDeleteable<T> In<PkType>(List<PkType> primaryKeyValues);
  29. IDeleteable<T> In<PkType>(Expression<Func<T,object>> inField,PkType primaryKeyValue);
  30. IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,PkType[] primaryKeyValues);
  31. IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField,List<PkType> primaryKeyValues);
  32. IDeleteable<T> In<PkType>(Expression<Func<T, object>> inField, ISugarQueryable<PkType> childQueryExpression);
  33. IDeleteable<T> In<PkType>(string inField, List<PkType> primaryKeyValues);
  34. IDeleteable<T> Where(string whereString,object parameters=null);
  35. IDeleteable<T> Where(string whereString, SugarParameter parameter);
  36. IDeleteable<T> Where(string whereString, SugarParameter[] parameters);
  37. IDeleteable<T> Where(string whereString, List<SugarParameter> parameters);
  38. IDeleteable<T> WhereColumns(T data, Expression<Func<T, object>> columns);
  39. IDeleteable<T> WhereColumns(List<T> list,Expression<Func<T, object>> columns);
  40. IDeleteable<T> WhereColumns(List<Dictionary<string,object>> columns);
  41. IDeleteable<T> Where(List<IConditionalModel> conditionalModels);
  42. IDeleteable<T> EnableDiffLogEventIF(bool isEnableDiffLogEvent, object businessData = null);
  43. IDeleteable<T> EnableDiffLogEvent(object businessData = null);
  44. IDeleteable<T> RemoveDataCache();
  45. IDeleteable<T> RemoveDataCache(string likeString);
  46. KeyValuePair<string, List<SugarParameter>> ToSql();
  47. string ToSqlString();
  48. IDeleteable<T> EnableQueryFilter();
  49. IDeleteable<T> EnableQueryFilter(Type type);
  50. SplitTableDeleteProvider<T> SplitTable(Func<List<SplitTableInfo>, IEnumerable<SplitTableInfo>> getTableNamesFunc);
  51. SplitTableDeleteByObjectProvider<T> SplitTable();
  52. LogicDeleteProvider<T> IsLogic();
  53. void AddQueue();
  54. }
  55. }