mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-02 11:49:06 +08:00
Update TDengine
This commit is contained in:
parent
f2baf9ec70
commit
bfdbdf39a6
@ -12,7 +12,7 @@ namespace SqlSugar.TDengine
|
||||
{
|
||||
protected override void Execute(Type entityType, EntityInfo entityInfo)
|
||||
{
|
||||
var attr = entityInfo.Type.GetCustomAttribute<STableAttribute>();
|
||||
var attr =GetCommonSTableAttribute( entityInfo.Type.GetCustomAttribute<STableAttribute>());
|
||||
if (attr?.STableName!=null&&attr?.Tag1!=null)
|
||||
{
|
||||
entityInfo.DbTableName = attr.STableName;
|
||||
@ -98,7 +98,7 @@ namespace SqlSugar.TDengine
|
||||
var tableName = GetTableName(entityInfo);
|
||||
var dbColumns = this.Context.DbMaintenance.GetColumnInfosByTableName(tableName, false);
|
||||
ConvertColumns(dbColumns);
|
||||
var attr = entityInfo.Type.GetCustomAttribute<STableAttribute>();
|
||||
var attr =GetCommonSTableAttribute( entityInfo.Type.GetCustomAttribute<STableAttribute>());
|
||||
var entityColumns = entityInfo.Columns.Where(it => it.IsIgnore == false).ToList();
|
||||
if (attr != null && attr.Tag1 != null)
|
||||
{
|
||||
@ -222,7 +222,7 @@ namespace SqlSugar.TDengine
|
||||
var addItem = EntityColumnToDbColumn(entityInfo, entityInfo.DbTableName, item);
|
||||
dbColumns.Add(addItem);
|
||||
}
|
||||
var attr = entityInfo.Type.GetCustomAttribute<STableAttribute>();
|
||||
var attr =GetCommonSTableAttribute( entityInfo.Type.GetCustomAttribute<STableAttribute>());
|
||||
var oldTableName = entityInfo.DbTableName;
|
||||
if (attr != null)
|
||||
{
|
||||
@ -249,7 +249,11 @@ namespace SqlSugar.TDengine
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private STableAttribute GetCommonSTableAttribute(STableAttribute sTableAttribute)
|
||||
{
|
||||
return sTableAttribute;
|
||||
}
|
||||
public string GetDatabaseTypeName(string typeName)
|
||||
{
|
||||
switch (typeName.ToLower())
|
||||
|
@ -473,7 +473,7 @@ namespace SqlSugar.TDengine
|
||||
public override void AddDefaultValue(EntityInfo entityInfo)
|
||||
{
|
||||
var talbeName = entityInfo.DbTableName;
|
||||
var attr = entityInfo.Type.GetCustomAttribute<STableAttribute>();
|
||||
var attr = GetCommonSTableAttribute(entityInfo.Type.GetCustomAttribute<STableAttribute>());
|
||||
if (attr?.Tag1 != null)
|
||||
{
|
||||
talbeName = attr.STableName;
|
||||
@ -493,6 +493,11 @@ namespace SqlSugar.TDengine
|
||||
}
|
||||
}
|
||||
|
||||
private STableAttribute GetCommonSTableAttribute(STableAttribute sTableAttribute)
|
||||
{
|
||||
return sTableAttribute;
|
||||
}
|
||||
|
||||
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
||||
{
|
||||
|
||||
|
@ -124,5 +124,10 @@ namespace SqlSugar
|
||||
});
|
||||
return groups;
|
||||
}
|
||||
private STableAttribute GetCommonSTableAttribute(STableAttribute sTableAttribute)
|
||||
{
|
||||
return sTableAttribute;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user