mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
0288cc14ce
commit
33ef48e849
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user