mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 20:27:56 +08:00
Support database "Vastbase"
This commit is contained in:
parent
fcf91c87fc
commit
cf1802bdca
@ -421,7 +421,7 @@ namespace SqlSugar
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private static void CheckDbDependency(ConnectionConfig config)
|
||||
private void CheckDbDependency(ConnectionConfig config)
|
||||
{
|
||||
switch (config.DbType)
|
||||
{
|
||||
@ -491,6 +491,14 @@ namespace SqlSugar
|
||||
case DbType.GaussDB:
|
||||
config.DbType = DbType.PostgreSQL;
|
||||
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");
|
||||
break;
|
||||
case DbType.OceanBase:
|
||||
config.DbType = DbType.MySql;
|
||||
break;
|
||||
|
@ -28,6 +28,7 @@ namespace SqlSugar
|
||||
GaussDB,
|
||||
OceanBase,
|
||||
Tidb,
|
||||
Vastbase,
|
||||
Custom =900
|
||||
}
|
||||
}
|
||||
|
@ -377,7 +377,13 @@ WHERE tgrelid = '"+tableName+"'::regclass");
|
||||
});
|
||||
if (!GetDataBaseList(newDb).Any(it => it.Equals(databaseName, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
newDb.Ado.ExecuteCommand(string.Format(CreateDataBaseSql, this.SqlBuilder.SqlTranslationLeft+databaseName+this.SqlBuilder.SqlTranslationRight, databaseDirectory));
|
||||
var isVast = this.Context?.TempItems?.ContainsKey("DbType.Vastbase")==true;
|
||||
var dbcompatibility = "";
|
||||
if (isVast)
|
||||
{
|
||||
dbcompatibility=" dbcompatibility = 'PG'";
|
||||
}
|
||||
newDb.Ado.ExecuteCommand(string.Format(CreateDataBaseSql, this.SqlBuilder.SqlTranslationLeft+databaseName+this.SqlBuilder.SqlTranslationRight, databaseDirectory)+ dbcompatibility);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user