Merge branch 'arjen-ag5/master' into pg_arrays
# Conflicts: # generator/template/model_template.go # generator/template/sql_builder_template.go # internal/jet/expression.go # postgres/cast.go # postgres/columns.go # postgres/expressions.go # postgres/insert_statement_test.go # postgres/literal.go # tests/postgres/alltypes_test.go # tests/postgres/generator_template_test.go # tests/postgres/scan_test.go # tests/postgres/select_test.go
This commit is contained in:
commit
45d4ced9b0
25 changed files with 575 additions and 85 deletions
|
|
@ -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
|
||||
|
||||
|
|
@ -80,6 +85,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)
|
||||
}
|
||||
|
||||
// Text is a parameter constructor for the PostgreSQL text type. This constructor also adds an
|
||||
// explicit placeholder type cast to text in the generated query, such as `$3::text`.
|
||||
// Example usage:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue