Synchronization code

This commit is contained in:
sunkaixuan
2022-10-13 11:28:56 +08:00
parent 3aa73e5294
commit 1302ab8142
3 changed files with 12 additions and 0 deletions

View File

@@ -252,6 +252,14 @@ namespace SqlSugar
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
this.Context.Ado.ExecuteCommand(string.Format(this.DropTableSql, tableName));
return true;
}
public virtual bool DropTable(string[] tableName)
{
foreach (var item in tableName)
{
DropTable(item);
}
return true;
}
public virtual bool DropTable<T>()
{

View File

@@ -2012,6 +2012,7 @@ namespace SqlSugar
{
if (this.Context.CurrentConnectionConfig.DbType != DbType.SqlServer)
{
this.QueryBuilder.Offset = "true";
return this.ToPageList(pageIndex, pageSize, ref totalNumber);
}
else
@@ -2025,6 +2026,7 @@ namespace SqlSugar
{
if (this.Context.CurrentConnectionConfig.DbType != DbType.SqlServer)
{
this.QueryBuilder.Offset = "true";
return this.ToPageListAsync(pageIndex, pageSize);
}
else
@@ -2037,6 +2039,7 @@ namespace SqlSugar
{
if (this.Context.CurrentConnectionConfig.DbType != DbType.SqlServer)
{
this.QueryBuilder.Offset = "true";
return await this.ToPageListAsync(pageIndex, pageSize, totalNumber);
}
else

View File

@@ -32,6 +32,7 @@ namespace SqlSugar
bool CreateIndex(string tableName, string [] columnNames, bool isUnique=false);
bool CreateIndex(string tableName, string[] columnNames, string IndexName, bool isUnique = false);
bool DropTable(string tableName);
bool DropTable(params string[] tableName);
bool DropTable<T>();
bool DropTable<T,T2>();
bool DropTable<T, T2,T3>();