Row and Array Comparisons (IN, NOT_IN).

This commit is contained in:
zer0sub 2019-06-04 11:52:37 +02:00
parent d69c67569a
commit 384c0c67f5
19 changed files with 170 additions and 231 deletions

View file

@ -14,8 +14,8 @@ type expression interface {
IS_NULL() BoolExpression
IS_NOT_NULL() BoolExpression
IN(subQuery selectStatement) BoolExpression
NOT_IN(subQuery selectStatement) BoolExpression
IN(expressions ...expression) BoolExpression
NOT_IN(expressions ...expression) BoolExpression
AS(alias string) projection
@ -46,12 +46,12 @@ func (e *expressionInterfaceImpl) IS_NOT_NULL() BoolExpression {
return newPostifxBoolExpression(e.parent, "IS NOT NULL")
}
func (e *expressionInterfaceImpl) IN(subQuery selectStatement) BoolExpression {
return newBinaryBoolExpression(e.parent, subQuery, "IN")
func (e *expressionInterfaceImpl) IN(expressions ...expression) BoolExpression {
return newBinaryBoolExpression(e.parent, WRAP(expressions...), "IN")
}
func (e *expressionInterfaceImpl) NOT_IN(subQuery selectStatement) BoolExpression {
return newBinaryBoolExpression(e.parent, subQuery, "NOT IN")
func (e *expressionInterfaceImpl) NOT_IN(expressions ...expression) BoolExpression {
return newBinaryBoolExpression(e.parent, WRAP(expressions...), "NOT IN")
}
func (e *expressionInterfaceImpl) AS(alias string) projection {