...

Source file src/github.com/doug-martin/goqu/v9/exp/bitwise.go

Documentation: github.com/doug-martin/goqu/v9/exp

     1  package exp
     2  
     3  type bitwise struct {
     4  	lhs Expression
     5  	rhs interface{}
     6  	op  BitwiseOperation
     7  }
     8  
     9  func NewBitwiseExpression(op BitwiseOperation, lhs Expression, rhs interface{}) BitwiseExpression {
    10  	return bitwise{op: op, lhs: lhs, rhs: rhs}
    11  }
    12  
    13  func (b bitwise) Clone() Expression {
    14  	return NewBitwiseExpression(b.op, b.lhs.Clone(), b.rhs)
    15  }
    16  
    17  func (b bitwise) RHS() interface{} {
    18  	return b.rhs
    19  }
    20  
    21  func (b bitwise) LHS() Expression {
    22  	return b.lhs
    23  }
    24  
    25  func (b bitwise) Op() BitwiseOperation {
    26  	return b.op
    27  }
    28  
    29  func (b bitwise) Expression() Expression                           { return b }
    30  func (b bitwise) As(val interface{}) AliasedExpression             { return NewAliasExpression(b, val) }
    31  func (b bitwise) Eq(val interface{}) BooleanExpression             { return eq(b, val) }
    32  func (b bitwise) Neq(val interface{}) BooleanExpression            { return neq(b, val) }
    33  func (b bitwise) Gt(val interface{}) BooleanExpression             { return gt(b, val) }
    34  func (b bitwise) Gte(val interface{}) BooleanExpression            { return gte(b, val) }
    35  func (b bitwise) Lt(val interface{}) BooleanExpression             { return lt(b, val) }
    36  func (b bitwise) Lte(val interface{}) BooleanExpression            { return lte(b, val) }
    37  func (b bitwise) Asc() OrderedExpression                           { return asc(b) }
    38  func (b bitwise) Desc() OrderedExpression                          { return desc(b) }
    39  func (b bitwise) Like(i interface{}) BooleanExpression             { return like(b, i) }
    40  func (b bitwise) NotLike(i interface{}) BooleanExpression          { return notLike(b, i) }
    41  func (b bitwise) ILike(i interface{}) BooleanExpression            { return iLike(b, i) }
    42  func (b bitwise) NotILike(i interface{}) BooleanExpression         { return notILike(b, i) }
    43  func (b bitwise) RegexpLike(val interface{}) BooleanExpression     { return regexpLike(b, val) }
    44  func (b bitwise) RegexpNotLike(val interface{}) BooleanExpression  { return regexpNotLike(b, val) }
    45  func (b bitwise) RegexpILike(val interface{}) BooleanExpression    { return regexpILike(b, val) }
    46  func (b bitwise) RegexpNotILike(val interface{}) BooleanExpression { return regexpNotILike(b, val) }
    47  func (b bitwise) In(i ...interface{}) BooleanExpression            { return in(b, i...) }
    48  func (b bitwise) NotIn(i ...interface{}) BooleanExpression         { return notIn(b, i...) }
    49  func (b bitwise) Is(i interface{}) BooleanExpression               { return is(b, i) }
    50  func (b bitwise) IsNot(i interface{}) BooleanExpression            { return isNot(b, i) }
    51  func (b bitwise) IsNull() BooleanExpression                        { return is(b, nil) }
    52  func (b bitwise) IsNotNull() BooleanExpression                     { return isNot(b, nil) }
    53  func (b bitwise) IsTrue() BooleanExpression                        { return is(b, true) }
    54  func (b bitwise) IsNotTrue() BooleanExpression                     { return isNot(b, true) }
    55  func (b bitwise) IsFalse() BooleanExpression                       { return is(b, false) }
    56  func (b bitwise) IsNotFalse() BooleanExpression                    { return isNot(b, false) }
    57  func (b bitwise) Distinct() SQLFunctionExpression                  { return NewSQLFunctionExpression("DISTINCT", b) }
    58  func (b bitwise) Between(val RangeVal) RangeExpression             { return between(b, val) }
    59  func (b bitwise) NotBetween(val RangeVal) RangeExpression          { return notBetween(b, val) }
    60  
    61  // used internally to create a Bitwise Inversion BitwiseExpression
    62  func bitwiseInversion(rhs Expression) BitwiseExpression {
    63  	return NewBitwiseExpression(BitwiseInversionOp, nil, rhs)
    64  }
    65  
    66  // used internally to create a Bitwise OR BitwiseExpression
    67  func bitwiseOr(lhs Expression, rhs interface{}) BitwiseExpression {
    68  	return NewBitwiseExpression(BitwiseOrOp, lhs, rhs)
    69  }
    70  
    71  // used internally to create a Bitwise AND BitwiseExpression
    72  func bitwiseAnd(lhs Expression, rhs interface{}) BitwiseExpression {
    73  	return NewBitwiseExpression(BitwiseAndOp, lhs, rhs)
    74  }
    75  
    76  // used internally to create a Bitwise XOR BitwiseExpression
    77  func bitwiseXor(lhs Expression, rhs interface{}) BitwiseExpression {
    78  	return NewBitwiseExpression(BitwiseXorOp, lhs, rhs)
    79  }
    80  
    81  // used internally to create a Bitwise LEFT SHIFT BitwiseExpression
    82  func bitwiseLeftShift(lhs Expression, rhs interface{}) BitwiseExpression {
    83  	return NewBitwiseExpression(BitwiseLeftShiftOp, lhs, rhs)
    84  }
    85  
    86  // used internally to create a Bitwise RIGHT SHIFT BitwiseExpression
    87  func bitwiseRightShift(lhs Expression, rhs interface{}) BitwiseExpression {
    88  	return NewBitwiseExpression(BitwiseRightShiftOp, lhs, rhs)
    89  }
    90  

View as plain text