Add support for Row expression.
This commit is contained in:
parent
58a386a3dd
commit
3fcbbec427
16 changed files with 254 additions and 63 deletions
|
|
@ -33,6 +33,9 @@ type DateTimeExpression = jet.TimestampExpression
|
|||
// TimestampExpression interface
|
||||
type TimestampExpression = jet.TimestampExpression
|
||||
|
||||
// RowExpression interface
|
||||
type RowExpression = jet.RowExpression
|
||||
|
||||
// BoolExp is bool expression wrapper around arbitrary expression.
|
||||
// Allows go compiler to see any expression as bool expression.
|
||||
// Does not add sql cast to generated sql builder output.
|
||||
|
|
@ -73,6 +76,11 @@ var DateTimeExp = jet.TimestampExp
|
|||
// Does not add sql cast to generated sql builder output.
|
||||
var TimestampExp = jet.TimestampExp
|
||||
|
||||
// RowExp serves as a wrapper for an arbitrary expression, treating it as a row expression.
|
||||
// This enables the Go compiler to interpret any expression as a row expression
|
||||
// Note: This does not modify the generated SQL builder output by adding a SQL CAST operation.
|
||||
var RowExp = jet.RowExp
|
||||
|
||||
// CustomExpression is used to define custom expressions.
|
||||
var CustomExpression = jet.CustomExpression
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,8 @@ var (
|
|||
OR = jet.OR
|
||||
)
|
||||
|
||||
// ROW is construct one table row from list of expressions.
|
||||
func ROW(expressions ...Expression) Expression {
|
||||
return jet.NewFunc("", expressions, nil)
|
||||
}
|
||||
// ROW is construct one row from a list of expressions.
|
||||
var ROW = jet.WRAP
|
||||
|
||||
// ------------------ Mathematical functions ---------------//
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue