Updte Vastbase

This commit is contained in:
sunkaixuan
2025-10-26 11:52:37 +08:00
parent 65586af160
commit c6ea5cca7d
4 changed files with 16 additions and 3 deletions

View File

@@ -511,6 +511,10 @@ namespace SqlSugar
config.DbType = DbType.PostgreSQL;
if (this.CurrentConnectionConfig.MoreSettings==null)
this.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings();
if (this.CurrentConnectionConfig.MoreSettings.DatabaseModel == DbType.MySql)
{
this.CurrentConnectionConfig.MoreSettings.InnerTemp = DbType.MySql;
}
this.CurrentConnectionConfig.MoreSettings.DatabaseModel = DbType.Vastbase;
break;
case DbType.OceanBase:

View File

@@ -36,9 +36,10 @@ namespace SqlSugar
public bool IsCorrectErrorSqlParameterName { get; set; }
public int MaxParameterNameLength { get; set; }
public bool DisableQueryWhereColumnRemoveTrim { get; set; }
public DbType? DatabaseModel { get;set; }
public DbType? DatabaseModel { get;set; }
public bool ClickHouseEnableFinal { get; set; }
public bool EnableJsonb { get; set; }
public PostgresIdentityStrategy PostgresIdentityStrategy { get; set; } = PostgresIdentityStrategy.Serial; // 兼容性处理默认使用Serial
internal object InnerTemp { get; set; }
}
}

View File

@@ -420,7 +420,14 @@ WHERE tgrelid = '"+tableName+"'::regclass");
if (isVast)
{
dbcompatibility=" dbcompatibility = 'PG'";
}
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.InnerTemp is DbType dbType)
{
if (dbType == DbType.MySql)
{
dbcompatibility = "";
}
}
}
newDb.Ado.ExecuteCommand(string.Format(CreateDataBaseSql, this.SqlBuilder.SqlTranslationLeft+databaseName+this.SqlBuilder.SqlTranslationRight, databaseDirectory)+ dbcompatibility);
}
return true;

View File

@@ -959,7 +959,8 @@ namespace SqlSugar
ClickHouseEnableFinal=it.MoreSettings.ClickHouseEnableFinal,
PgSqlIsAutoToLowerSchema=it.MoreSettings.PgSqlIsAutoToLowerSchema,
EnableJsonb=it.MoreSettings.EnableJsonb,
PostgresIdentityStrategy = it.MoreSettings.PostgresIdentityStrategy
PostgresIdentityStrategy = it.MoreSettings.PostgresIdentityStrategy,
InnerTemp=it.MoreSettings?.InnerTemp
},
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle