Insertable.cs 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 partial interface IInsertable<T> where T :class,new()
  11. {
  12. InsertBuilder InsertBuilder { get; set; }
  13. int ExecuteCommand();
  14. Task<int> ExecuteCommandAsync();
  15. Task<int> ExecuteCommandAsync(CancellationToken token);
  16. List<Type> ExecuteReturnPkList<Type>();
  17. Task<List<Type>> ExecuteReturnPkListAsync<Type>();
  18. long ExecuteReturnSnowflakeId();
  19. List<long> ExecuteReturnSnowflakeIdList();
  20. Task<long> ExecuteReturnSnowflakeIdAsync();
  21. Task<long> ExecuteReturnSnowflakeIdAsync(CancellationToken token);
  22. Task<List<long>> ExecuteReturnSnowflakeIdListAsync();
  23. Task<List<long>> ExecuteReturnSnowflakeIdListAsync(CancellationToken token);
  24. int ExecuteReturnIdentity();
  25. Task<int> ExecuteReturnIdentityAsync();
  26. Task<int> ExecuteReturnIdentityAsync(CancellationToken token);
  27. T ExecuteReturnEntity();
  28. T ExecuteReturnEntity(bool isIncludesAllFirstLayer);
  29. Task<T> ExecuteReturnEntityAsync();
  30. Task<T> ExecuteReturnEntityAsync(bool isIncludesAllFirstLayer);
  31. bool ExecuteCommandIdentityIntoEntity();
  32. Task<bool> ExecuteCommandIdentityIntoEntityAsync();
  33. long ExecuteReturnBigIdentity();
  34. Task<long> ExecuteReturnBigIdentityAsync();
  35. Task<long> ExecuteReturnBigIdentityAsync(CancellationToken token);
  36. IInsertable<T> AS(string tableName);
  37. IInsertable<T> AsType(Type tableNameType);
  38. IInsertable<T> With(string lockString);
  39. IInsertable<T> InsertColumns(Expression<Func<T, object>> columns);
  40. IInsertable<T> InsertColumns(params string[] columns);
  41. IInsertable<T> IgnoreColumns(Expression<Func<T, object>> columns);
  42. IInsertable<T> IgnoreColumns(params string[]columns);
  43. IInsertable<T> IgnoreColumns(bool ignoreNullColumn, bool isOffIdentity = false);
  44. IInsertable<T> IgnoreColumnsNull(bool isIgnoreNull = true);
  45. ISubInsertable<T> AddSubList(Expression<Func<T, object>> subForeignKey);
  46. ISubInsertable<T> AddSubList(Expression<Func<T, SubInsertTree>> tree);
  47. IParameterInsertable<T> UseParameter();
  48. IInsertable<T> CallEntityMethod(Expression<Action<T>> method);
  49. IInsertable<T> EnableDiffLogEvent(object businessData = null);
  50. IInsertable<T> EnableDiffLogEventIF(bool isDiffLogEvent, object businessData=null);
  51. IInsertable<T> RemoveDataCache();
  52. IInsertable<T> RemoveDataCache(string likeString);
  53. KeyValuePair<string, List<SugarParameter>> ToSql();
  54. string ToSqlString();
  55. SqlServerBlukCopy UseSqlServer();
  56. MySqlBlukCopy<T> UseMySql();
  57. OracleBlukCopy UseOracle();
  58. SplitInsertable<T> SplitTable();
  59. SplitInsertable<T> SplitTable(SplitType splitType);
  60. void AddQueue();
  61. IInsertable<T> MySqlIgnore();
  62. IInsertable<T> OffIdentity();
  63. IInsertable<T> OffIdentity(bool isSetOn);
  64. InsertablePage<T> PageSize(int pageSize);
  65. }
  66. }