mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 增加 Oracle 表达式解析 yyyyMMdd 常用 c# 日期格式化;
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user