Use single quotes around the truncation parameter.
(Assume future enums in DateTruncate will correspond to the postgres args).
This commit is contained in:
@@ -97,8 +97,8 @@ public class PostgreSQLBuilder
|
|||||||
@Override
|
@Override
|
||||||
public Void visit (DateTruncate exp)
|
public Void visit (DateTruncate exp)
|
||||||
{
|
{
|
||||||
// exp.getTruncation() is currently always DAY
|
String field = "'" + exp.getTruncation().toString().toLowerCase() + "'";
|
||||||
return appendFunctionCall("date_trunc", Exps.literal("day"), exp.getArg());
|
return appendFunctionCall("date_trunc", Exps.literal(field), exp.getArg());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String translateDatePart (Part part)
|
protected String translateDatePart (Part part)
|
||||||
|
|||||||
Reference in New Issue
Block a user