mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Update 人大金仓
This commit is contained in:
parent
2b0d2a64f6
commit
043f568165
@ -54,6 +54,17 @@ namespace SqlSugar
|
||||
{
|
||||
result.DataType = "datetime";
|
||||
}
|
||||
if (IsSqlServerModel())
|
||||
{
|
||||
if (result.DataType.EqualCase("int4"))
|
||||
{
|
||||
result.DataType = "int";
|
||||
}
|
||||
if (result.DataType.EqualCase("int8"))
|
||||
{
|
||||
result.DataType = "bigint";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -77,5 +88,9 @@ namespace SqlSugar
|
||||
this.Context.DbMaintenance.AddPrimaryKey(tableName, item.DbColumnName);
|
||||
}
|
||||
|
||||
private bool IsSqlServerModel()
|
||||
{
|
||||
return this.Context.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user