Synchronization code

This commit is contained in:
sunkaixuan
2024-03-18 17:04:11 +08:00
parent 038cd245ec
commit ab95fc6e5c
3 changed files with 8 additions and 6 deletions

View File

@@ -493,11 +493,9 @@ namespace SqlSugar
break;
case DbType.Vastbase:
config.DbType = DbType.PostgreSQL;
if (this.TempItems == null)
{
this.TempItems = new Dictionary<string, object>();
}
this.TempItems.Add("DbType.Vastbase", "DbType.Vastbase");
if (this.CurrentConnectionConfig.MoreSettings==null)
this.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings();
this.CurrentConnectionConfig.MoreSettings.DatabaseModel = DbType.Vastbase;
break;
case DbType.OceanBase:
config.DbType = DbType.MySql;
@@ -508,6 +506,9 @@ namespace SqlSugar
case DbType.PolarDB:
config.DbType = DbType.MySql;
break;
case DbType.Doris:
config.DbType = DbType.MySql;
break;
case DbType.TDengine:
Check.Exception(SugarCompatible.IsFramework, "TDengine only support .net core");
InstanceFactory.CustomDllName = SugarCompatible.IsFramework ? "SqlSugar.TDengine" : "SqlSugar.TDengineCore";

View File

@@ -30,6 +30,7 @@ namespace SqlSugar
Tidb,
Vastbase,
PolarDB,
Doris,
Custom =900
}
}

View File

@@ -381,7 +381,7 @@ WHERE tgrelid = '"+tableName+"'::regclass");
});
if (!GetDataBaseList(newDb).Any(it => it.Equals(databaseName, StringComparison.CurrentCultureIgnoreCase)))
{
var isVast = this.Context?.TempItems?.ContainsKey("DbType.Vastbase")==true;
var isVast = this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel==DbType.Vastbase;
var dbcompatibility = "";
if (isVast)
{