Merge pull request #339 from kblomster/expose-binary-operator

Export BinaryOperator function
This commit is contained in:
go-jet 2024-03-28 18:04:01 +01:00 committed by GitHub
commit b13f6ab08d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 0 deletions

View file

@ -188,3 +188,7 @@ func (c *caseOperatorImpl) serialize(statement StatementType, out *SQLBuilder, o
func DISTINCT(expr Expression) Expression { func DISTINCT(expr Expression) Expression {
return newPrefixOperatorExpression(expr, "DISTINCT") return newPrefixOperatorExpression(expr, "DISTINCT")
} }
func BinaryOperator(lhs Expression, rhs Expression, operator string) Expression {
return NewBinaryOperatorExpression(lhs, rhs, operator)
}

View file

@ -93,3 +93,6 @@ var Func = jet.Func
// NewEnumValue creates new named enum value // NewEnumValue creates new named enum value
var NewEnumValue = jet.NewEnumValue var NewEnumValue = jet.NewEnumValue
// BinaryOperator can be used to use custom or unsupported operators that take two operands.
var BinaryOperator = jet.BinaryOperator

View file

@ -142,3 +142,6 @@ var Func = jet.Func
// NewEnumValue creates new named enum value // NewEnumValue creates new named enum value
var NewEnumValue = jet.NewEnumValue var NewEnumValue = jet.NewEnumValue
// BinaryOperator can be used to use custom or unsupported operators that take two operands.
var BinaryOperator = jet.BinaryOperator

View file

@ -96,3 +96,6 @@ var Func = jet.Func
// NewEnumValue creates new named enum value // NewEnumValue creates new named enum value
var NewEnumValue = jet.NewEnumValue var NewEnumValue = jet.NewEnumValue
// BinaryOperator can be used to use custom or unsupported operators that take two operands.
var BinaryOperator = jet.BinaryOperator