温故知新20230317
- 接口和抽象类的区别和联系
https://www.cnblogs.com/binyao/p/4891306.html
抽象基类包含字段、属性 方法的实现;
- sqlsugar数据库字段映射实体,底层是如何实现的?
查看缓存,缓存无的情况下;
总结:查询语句 select获取表 架构(DataType,IsNullable,IsIdentity,ColumnDescription,ColumnName,IsPrimarykey,Length,Scale);
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
{
string cacheKey = "DbMaintenanceProvider.GetColumnInfosByTableName." + this.SqlBuilder.GetNoTranslationColumnName(tableName).ToLower();
cacheKey = GetCacheKey(cacheKey);
if (!isCache)
return GetColumnInfosByTableName(tableName);
else
return this.Context.Utilities.GetReflectionInoCacheInstance().GetOrCreate(cacheKey,
() =>
{
return GetColumnInfosByTableName(tableName);
});
}

浙公网安备 33010602011771号