mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 21:27:58 +08:00
Action Table Remark
This commit is contained in:
parent
706e583527
commit
c5f53a33fd
@ -45,7 +45,7 @@ namespace SqlSugar
|
|||||||
cacheKey = GetCacheKey(cacheKey);
|
cacheKey = GetCacheKey(cacheKey);
|
||||||
var sql = string.Format(this.GetColumnInfosByTableNameSql, tableName);
|
var sql = string.Format(this.GetColumnInfosByTableNameSql, tableName);
|
||||||
if (isCache)
|
if (isCache)
|
||||||
return GetListOrCache<DbColumnInfo>(cacheKey, sql).GroupBy(it=>it.DbColumnName).Select(it=>it.First()).ToList();
|
return GetListOrCache<DbColumnInfo>(cacheKey, sql).GroupBy(it => it.DbColumnName).Select(it => it.First()).ToList();
|
||||||
else
|
else
|
||||||
return this.Context.Ado.SqlQuery<DbColumnInfo>(sql).GroupBy(it => it.DbColumnName).Select(it => it.First()).ToList();
|
return this.Context.Ado.SqlQuery<DbColumnInfo>(sql).GroupBy(it => it.DbColumnName).Select(it => it.First()).ToList();
|
||||||
|
|
||||||
@ -208,6 +208,42 @@ namespace SqlSugar
|
|||||||
this.Context.Ado.ExecuteCommand(sql);
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
public virtual bool AddColumnRemark(string columnName, string tableName, string description)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.AddColumnRemarkSql, columnName, tableName, description);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public virtual bool DeleteColumnRemark(string columnName, string tableName)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.DeleteColumnRemarkSql, columnName, tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public virtual bool IsAnyColumnRemark(string columnName, string tableName)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.IsAnyColumnRemarkSql, columnName, tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public virtual bool AddTableRemark(string columnName, string tableName, string description)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.AddTableRemarkSql, columnName, tableName, description);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public virtual bool DeleteTableRemark(string columnName, string tableName)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.DeleteTableRemarkSql, columnName, tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public virtual bool IsAnyTableRemark(string columnName, string tableName)
|
||||||
|
{
|
||||||
|
string sql = string.Format(this.IsAnyTableRemarkSql, columnName, tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private
|
#region Private
|
||||||
|
@ -43,6 +43,12 @@ namespace SqlSugar
|
|||||||
protected abstract string DropConstraintSql { get; }
|
protected abstract string DropConstraintSql { get; }
|
||||||
protected abstract string AddPrimaryKeySql { get; }
|
protected abstract string AddPrimaryKeySql { get; }
|
||||||
protected abstract string RenameColumnSql { get; }
|
protected abstract string RenameColumnSql { get; }
|
||||||
|
protected abstract string AddColumnRemarkSql { get; }
|
||||||
|
protected abstract string DeleteColumnRemarkSql { get; }
|
||||||
|
protected abstract string IsAnyColumnRemarkSql { get; }
|
||||||
|
protected abstract string AddTableRemarkSql { get; }
|
||||||
|
protected abstract string DeleteTableRemarkSql { get; }
|
||||||
|
protected abstract string IsAnyTableRemarkSql { get; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Check
|
#region Check
|
||||||
|
@ -37,6 +37,12 @@ namespace SqlSugar
|
|||||||
bool BackupTable(string oldTableName, string newTableName, int maxBackupDataRows = int.MaxValue);
|
bool BackupTable(string oldTableName, string newTableName, int maxBackupDataRows = int.MaxValue);
|
||||||
bool DropColumn(string tableName,string columnName);
|
bool DropColumn(string tableName,string columnName);
|
||||||
bool RenameColumn(string tableName, string oldColumnName, string newColumnName);
|
bool RenameColumn(string tableName, string oldColumnName, string newColumnName);
|
||||||
|
bool AddColumnRemark(string columnName,string tableName,string description);
|
||||||
|
bool DeleteColumnRemark(string columnName, string tableName);
|
||||||
|
bool IsAnyColumnRemark(string columnName, string tableName);
|
||||||
|
bool AddTableRemark(string columnName, string tableName, string description);
|
||||||
|
bool DeleteTableRemark(string columnName, string tableName);
|
||||||
|
bool IsAnyTableRemark(string columnName, string tableName);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,54 @@ namespace SqlSugar
|
|||||||
return "AUTO_INCREMENT";
|
return "AUTO_INCREMENT";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string AddColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string AddTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
@ -169,6 +169,54 @@ namespace SqlSugar
|
|||||||
return "IDENTITY(1,1)";
|
return "IDENTITY(1,1)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string AddColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string AddTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
@ -200,6 +200,58 @@ namespace SqlSugar
|
|||||||
return "IDENTITY(1,1)";
|
return "IDENTITY(1,1)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string AddColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string AddTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public override bool CreateTable(string tableName, List<DbColumnInfo> columns, bool isCreatePrimaryKey = true)
|
public override bool CreateTable(string tableName, List<DbColumnInfo> columns, bool isCreatePrimaryKey = true)
|
||||||
|
@ -161,6 +161,54 @@ namespace SqlSugar
|
|||||||
return "AUTOINCREMENT";
|
return "AUTOINCREMENT";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override string AddColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyColumnRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string AddTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string DeleteTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string IsAnyTableRemarkSql
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
Loading…
Reference in New Issue
Block a user