mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update Drop index
This commit is contained in:
@@ -246,7 +246,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
|
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
|
||||||
tableName= this.SqlBuilder.GetNoTranslationColumnName(tableName);
|
tableName= this.SqlBuilder.GetNoTranslationColumnName(tableName);
|
||||||
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ON {tableName}");
|
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public virtual bool DropView(string viewName)
|
public virtual bool DropView(string viewName)
|
||||||
|
@@ -288,6 +288,13 @@ namespace SqlSugar
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
public override bool DropIndex(string indexName, string tableName)
|
||||||
|
{
|
||||||
|
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
|
||||||
|
tableName = this.SqlBuilder.GetNoTranslationColumnName(tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ON {tableName}");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
||||||
{
|
{
|
||||||
if (DorisHelper.IsDoris(this.Context))
|
if (DorisHelper.IsDoris(this.Context))
|
||||||
|
@@ -322,6 +322,13 @@ namespace SqlSugar
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
public override bool DropIndex(string indexName, string tableName)
|
||||||
|
{
|
||||||
|
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
|
||||||
|
tableName = this.SqlBuilder.GetNoTranslationColumnName(tableName);
|
||||||
|
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ON {tableName}");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
public override bool SetAutoIncrementInitialValue(string tableName,int initialValue)
|
public override bool SetAutoIncrementInitialValue(string tableName,int initialValue)
|
||||||
{
|
{
|
||||||
this.Context.Ado.ExecuteCommand($"DBCC CHECKIDENT ('"+ tableName + $"', RESEED, {initialValue})");
|
this.Context.Ado.ExecuteCommand($"DBCC CHECKIDENT ('"+ tableName + $"', RESEED, {initialValue})");
|
||||||
|
Reference in New Issue
Block a user