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
8e171fec97
commit
499dec9569
@ -20,6 +20,10 @@ namespace SqlSugar
|
||||
}
|
||||
else if (IsOracle() || IsPg())
|
||||
{
|
||||
if (this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer)
|
||||
{
|
||||
return string.Format("FORMAT({0},'{1}','en-US')", value, formatString);
|
||||
}
|
||||
if (!(formatString?.Contains("24") == true))
|
||||
{
|
||||
formatString = formatString.Replace("HH", "hh24");
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -786,6 +786,10 @@ namespace SqlSugar
|
||||
if (model.Args.Count > 1)
|
||||
{
|
||||
var dateString2 = this.Context.DbMehtods.GetDateString(model.Args.First().MemberName.ObjToString(), model.Args.Last().MemberValue.ObjToString());
|
||||
if (IsSqlServerModel())
|
||||
{
|
||||
return string.Format("FORMAT({0},'{1}','en-US')", model.Args.First().MemberName.ObjToString(), model.Args.Last().MemberValue.ObjToString());
|
||||
}
|
||||
if (dateString2 != null) return dateString2;
|
||||
return GeDateFormat(model.Args.Last().MemberValue.ObjToString(), model.Args.First().MemberName.ObjToString());
|
||||
}
|
||||
@ -999,6 +1003,11 @@ namespace SqlSugar
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool IsSqlServerModel()
|
||||
{
|
||||
return this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
|
||||
}
|
||||
|
||||
private string GetLike(string result, bool iLike)
|
||||
{
|
||||
if (iLike)
|
||||
|
Loading…
Reference in New Issue
Block a user