Browse Source

PgSql BUG

pull/12/MERGE
skx 5 years ago
parent
commit
42bb3f3e4c
  1. 4
      Src/Asp.Net/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLExpressionContext.cs

4
Src/Asp.Net/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLExpressionContext.cs

@ -178,14 +178,14 @@ namespace SqlSugar
var parameter = model.Args[0]; var parameter = model.Args[0];
var parameter2 = model.Args[1]; var parameter2 = model.Args[1];
var parameter3 = model.Args[2]; var parameter3 = model.Args[2];
return string.Format(" (DATE_ADD({1} , INTERVAL {2} {0})) ", parameter3.MemberValue, parameter.MemberName, parameter2.MemberName); return string.Format(" ({1} + ({2}||'{0}')::INTERVAL) ", parameter3.MemberValue, parameter.MemberName, parameter2.MemberName);
} }
public override string DateAddDay(MethodCallExpressionModel model) public override string DateAddDay(MethodCallExpressionModel model)
{ {
var parameter = model.Args[0]; var parameter = model.Args[0];
var parameter2 = model.Args[1]; var parameter2 = model.Args[1];
return string.Format(" (DATE_ADD({1} INTERVAL {0} day)) ", parameter.MemberName, parameter2.MemberName); return string.Format(" ({0} + ({1}||'day')::INTERVAL) ", parameter.MemberName, parameter2.MemberName);
} }
public override string ToInt32(MethodCallExpressionModel model) public override string ToInt32(MethodCallExpressionModel model)

Loading…
Cancel
Save