Add support for postgres arrays

This commit is contained in:
Arjen Brouwer 2024-09-03 15:39:36 +02:00 committed by go-jet
parent b835e25665
commit d3ada5361e
27 changed files with 558 additions and 74 deletions

View file

@ -11,6 +11,11 @@ func Bool(value bool) BoolExpression {
return CAST(jet.Bool(value)).AS_BOOL()
}
// BoolArray creates new bool array literal expression
func BoolArray(elements []bool) BoolArrayExpression {
return jet.BoolArray(elements)
}
// Int is constructor for 64 bit signed integer expressions literals.
var Int = jet.Int
@ -65,6 +70,11 @@ func String(value string) StringExpression {
return CAST(jet.String(value)).AS_TEXT()
}
// StringArray creates new string array literal expression
func StringArray(elements []string) StringArrayExpression {
return jet.StringArray(elements)
}
// Json creates new json literal expression
func Json(value interface{}) StringExpression {
switch value.(type) {