Literal expressions clean up.

This commit is contained in:
go-jet 2019-08-16 11:19:06 +02:00
parent bcdab0f111
commit ba5ee27990
14 changed files with 78 additions and 36 deletions

View file

@ -180,7 +180,7 @@ func CURRENT_TIMESTAMP(precision ...int) TimestampExpression {
// NOW returns current datetime
func NOW(fsp ...int) DateTimeExpression {
if len(fsp) > 0 {
return jet.NewTimestampFunc("NOW", Int(int64(fsp[0]), true))
return jet.NewTimestampFunc("NOW", jet.ConstLiteral(int64(fsp[0])))
}
return jet.NewTimestampFunc("NOW")
}