- 增加 Oracle 表达式解析 yyyyMMdd 常用 c# 日期格式化;

This commit is contained in:
28810
2020-05-24 05:50:09 +08:00
parent 70266c08c8
commit 2a42731134
10 changed files with 200 additions and 56 deletions

View File

@ -1,5 +1,4 @@
using FreeSql.Internal;
using FreeSql.Internal.Model;
using System;
using System.Collections;
using System.Collections.Generic;
@ -485,7 +484,7 @@ namespace FreeSql.Odbc.PostgreSQL
case "Equals": return $"({left} = ({args1})::timestamp)";
case "CompareTo": return $"extract(epoch from ({left})::timestamp-({args1})::timestamp)";
case "ToString":
left = $"({left})::timestamp";
if (left.EndsWith("::timestamp") == false) left = $"({left})::timestamp";
if (exp.Arguments.Count == 0) return $"to_char({left},'YYYY-MM-DD HH24:MI:SS.US')";
switch (args1)
{