Synchronization code

This commit is contained in:
sunkaixuan 2024-03-05 21:24:44 +08:00
parent 0288cc14ce
commit 33ef48e849

View File

@ -54,6 +54,10 @@ namespace SqlSugar
{
sql = sql.Replace("sys_", "pg_");
}
else if (IsSqlServerModel())
{
sql = sql.Replace("sys_constraint.conkey[1]", "sys_constraint.conkey{{1}}");
}
return sql;
}
}
@ -611,6 +615,10 @@ WHERE tgrelid = '" + tableName + "'::regclass");
{
return this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.PostgreSQL;
}
private bool IsSqlServerModel()
{
return this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
}
#endregion
}
}