mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-24 08:33:16 +08:00
Compare commits
2 Commits
65586af160
...
5d87e1f692
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d87e1f692 | ||
|
|
c6ea5cca7d |
@@ -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:
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.115-preview13" />
|
||||
<ProjectReference Include="..\SqlSugar\SqlSugar.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user