mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update 人大金仓[SqlServer]
This commit is contained in:
parent
842f9c4c88
commit
8e171fec97
@ -99,6 +99,7 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("name",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("text",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("char",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("nchar",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("character",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("cidr",CSharpDataType.@string),
|
||||
new KeyValuePair<string, CSharpDataType>("circle",CSharpDataType.@string),
|
||||
|
@ -300,6 +300,10 @@ namespace SqlSugar
|
||||
}
|
||||
public override string DateAddByType(MethodCallExpressionModel model)
|
||||
{
|
||||
if (IsSqlServerModel(model))
|
||||
{
|
||||
return base.DateAddByType(model);
|
||||
}
|
||||
var parameter = model.Args[0];
|
||||
var parameter2 = model.Args[1];
|
||||
var parameter3 = model.Args[2];
|
||||
@ -312,6 +316,10 @@ namespace SqlSugar
|
||||
|
||||
public override string DateAddDay(MethodCallExpressionModel model)
|
||||
{
|
||||
if (IsSqlServerModel(model))
|
||||
{
|
||||
return base.DateAddDay(model);
|
||||
}
|
||||
var parameter = model.Args[0];
|
||||
var parameter2 = model.Args[1];
|
||||
return string.Format(" ({0} + ({1}||'day')::INTERVAL) ", parameter.MemberName, parameter2.MemberName);
|
||||
@ -494,5 +502,11 @@ namespace SqlSugar
|
||||
}
|
||||
return $" to_char({dateValue},'{formatString}') ";
|
||||
}
|
||||
|
||||
private static bool IsSqlServerModel(MethodCallExpressionModel model)
|
||||
{
|
||||
return model?.Conext?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user