From 238fe71c3dddb0c9687c1c4207d6df90fa5c52d8 Mon Sep 17 00:00:00 2001 From: XuShuo Date: Sun, 18 Feb 2024 19:12:53 +0800 Subject: [PATCH] Revert "feat: add some bitwise operations". There is no Test case for this commit, Maybe create PR later This reverts commit 13b7aba2c3a4809d4fb505c37c9f36e89644357d. --- expression.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/expression.go b/expression.go index e2c52fc..82bf9ff 100644 --- a/expression.go +++ b/expression.go @@ -76,11 +76,6 @@ type NumberExpression interface { Avg() NumberExpression Min() UnknownExpression Max() UnknownExpression - - BitWiseAnd(other interface{}) NumberExpression - BitWiseOr(other interface{}) NumberExpression - BitWiseXor(other interface{}) NumberExpression - BitWiseNot() NumberExpression } // StringExpression is the interface of an SQL expression with string value. @@ -539,23 +534,6 @@ func (e expression) Contains(substring string) BooleanExpression { return function("LOCATE", substring, e).GreaterThan(0) } -func (e expression) BitWiseAnd(other interface{}) NumberExpression { - return e.binaryOperation("&", other, 9, false) -} - -func (e expression) BitWiseOr(other interface{}) NumberExpression { - return e.binaryOperation("|", other, 10, false) -} - -func (e expression) BitWiseXor(other interface{}) NumberExpression { - return e.binaryOperation("^", other, 5, false) -} - -func (e expression) BitWiseNot() NumberExpression { - return e.prefixSuffixExpression("~", "", 4, false) - -} - func (e expression) binaryOperation(operator string, value interface{}, priority priority, isBool bool) expression { return expression{builder: func(scope scope) (string, error) { leftSql, err := e.GetSQL(scope)