Allow Raw helper to accept named arguments

This commit is contained in:
go-jet 2021-05-14 12:15:35 +02:00
parent 9385f462df
commit 7af9072b8d
12 changed files with 340 additions and 36 deletions

View file

@ -97,7 +97,7 @@ func INTERVAL(value interface{}, unitType unitType) Interval {
// INTERVALe creates new temporal interval from expresion and unit type.
func INTERVALe(expr Expression, unitType unitType) Interval {
return jet.NewInterval(jet.ListSerializer{
Serializers: []jet.Serializer{expr, jet.Raw(string(unitType))},
Serializers: []jet.Serializer{expr, jet.RawWithParent(string(unitType))},
Separator: " ",
})
}