mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-07 17:00:52 +08:00
- 优化 DateTime.Subtract 统一得到秒差值;
This commit is contained in:
@@ -422,8 +422,7 @@ namespace FreeSql.Oracle
|
||||
case "Subtract":
|
||||
switch ((exp.Arguments[0].Type.IsNullableType() ? exp.Arguments[0].Type.GetGenericArguments().FirstOrDefault() : exp.Arguments[0].Type).FullName)
|
||||
{
|
||||
case "System.DateTime": return $"numtodsinterval(({left}+0)-({args1}+0),'day')";
|
||||
case "System.TimeSpan": return $"({left}-{args1})";
|
||||
case "System.DateTime": return $"((({left}+0)-({args1}+0))*{24 * 60 * 60})";
|
||||
}
|
||||
break;
|
||||
case "Equals": return $"({left} = {args1})";
|
||||
|
||||
Reference in New Issue
Block a user