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