mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
3640a3a362
commit
63ff91f341
@ -63,6 +63,17 @@ namespace SqlSugar
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public List<DbColumnInfo> GetColumnInfosByTableName(string tableName, Func<DbType, string, string> getChangeSqlFunc)
|
||||
{
|
||||
var db = this.Context.CopyNew();
|
||||
db.Aop.OnExecutingChangeSql = (sql, pars) =>
|
||||
{
|
||||
sql = getChangeSqlFunc(this.Context.CurrentConnectionConfig.DbType, sql);
|
||||
return new KeyValuePair<string, SugarParameter[]>(sql, pars);
|
||||
};
|
||||
var result = db.DbMaintenance.GetColumnInfosByTableName(tableName,false);
|
||||
return result;
|
||||
}
|
||||
public virtual List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
||||
{
|
||||
if (string.IsNullOrEmpty(tableName)) return new List<DbColumnInfo>();
|
||||
|
@ -15,6 +15,7 @@ namespace SqlSugar
|
||||
List<DbTableInfo> GetTableInfoList(bool isCache=true);
|
||||
List<DbTableInfo> GetTableInfoList(Func<DbType, string, string> getChangeSqlFunc);
|
||||
List<DbColumnInfo> GetColumnInfosByTableName(string tableName,bool isCache=true);
|
||||
List<DbColumnInfo> GetColumnInfosByTableName(string tableName, Func<DbType, string, string> getChangeSqlFunc);
|
||||
List<string> GetIsIdentities(string tableName);
|
||||
List<string> GetPrimaries(string tableName);
|
||||
List<string> GetProcList(string dbName);
|
||||
|
Loading…
Reference in New Issue
Block a user