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.
39 lines
1.6 KiB
39 lines
1.6 KiB
using System.Collections.Generic;
|
|
namespace SqlSugar
|
|
{
|
|
public partial interface IDbMaintenance
|
|
{
|
|
SqlSugarClient Context { get; set; }
|
|
|
|
#region DML
|
|
List<DbTableInfo> GetViewInfoList();
|
|
List<DbTableInfo> GetTableInfoList();
|
|
List<DbColumnInfo> GetColumnInfosByTableName(string tableName);
|
|
List<string> GetIsIdentities(string tableName);
|
|
List<string> GetPrimaries(string tableName);
|
|
#endregion
|
|
|
|
#region Check
|
|
bool IsAnyTable(string tableName);
|
|
bool IsAnyColumn(string tableName, string column);
|
|
bool IsPrimaryKey(string tableName, string column);
|
|
bool IsIdentity(string tableName, string column);
|
|
bool IsAnyConstraint(string ConstraintName);
|
|
bool IsAnySystemTablePermissions();
|
|
#endregion
|
|
|
|
#region DDL
|
|
bool DropTable(string tableName);
|
|
bool TruncateTable(string tableName);
|
|
bool CreateTable(string tableName, List<DbColumnInfo> columns,bool isCreatePrimaryKey=true);
|
|
bool AddColumn(string tableName, DbColumnInfo column);
|
|
bool UpdateColumn(string tableName, DbColumnInfo column);
|
|
bool AddPrimaryKey(string tableName,string columnName);
|
|
bool DropConstraint(string tableName, string constraintName);
|
|
bool BackupDataBase(string databaseName,string fullFileName);
|
|
bool BackupTable(string oldTableName, string newTableName, int maxBackupDataRows = int.MaxValue);
|
|
bool DropColumn(string tableName,string columnName);
|
|
bool RenameColumn(string tableName, string oldColumnName, string newColumnName);
|
|
#endregion
|
|
}
|
|
}
|