You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.0 KiB

2 years ago
  1. namespace SqlSugar
  2. {
  3. public abstract partial class DbMaintenanceProvider : IDbMaintenance
  4. {
  5. #region Context
  6. private ISqlBuilder _SqlBuilder;
  7. public SqlSugarClient Context { get; set; }
  8. public ISqlBuilder SqlBuilder
  9. {
  10. get
  11. {
  12. if (_SqlBuilder == null)
  13. {
  14. _SqlBuilder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
  15. _SqlBuilder.Context = this.Context;
  16. }
  17. return _SqlBuilder;
  18. }
  19. }
  20. #endregion
  21. #region DML
  22. protected abstract string GetViewInfoListSql { get; }
  23. protected abstract string GetTableInfoListSql { get; }
  24. protected abstract string GetColumnInfosByTableNameSql { get; }
  25. #endregion
  26. #region DDL
  27. protected abstract string AddColumnToTableSql { get; }
  28. protected abstract string AlterColumnToTableSql { get; }
  29. protected abstract string BackupDataBaseSql { get; }
  30. protected abstract string CreateTableSql { get; }
  31. protected abstract string CreateTableColumn { get; }
  32. protected abstract string BackupTableSql { get; }
  33. protected abstract string TruncateTableSql { get; }
  34. protected abstract string DropTableSql { get; }
  35. protected abstract string DropColumnToTableSql { get; }
  36. protected abstract string DropConstraintSql { get; }
  37. protected abstract string AddPrimaryKeySql { get; }
  38. protected abstract string RenameColumnSql { get; }
  39. #endregion
  40. #region Check
  41. protected abstract string CheckSystemTablePermissionsSql { get; }
  42. #endregion
  43. #region Scattered
  44. protected abstract string CreateTableNull { get; }
  45. protected abstract string CreateTableNotNull { get; }
  46. protected abstract string CreateTablePirmaryKey { get; }
  47. protected abstract string CreateTableIdentity { get; }
  48. #endregion
  49. }
  50. }