Returns a representation of "a=b"
(lhs, rhs Expression)
| 439 | |
| 440 | // Returns a representation of "a=b" |
| 441 | func Eq(lhs, rhs Expression) BoolExpression { |
| 442 | lit, ok := rhs.(*literalExpression) |
| 443 | if ok && sqltypes.Value(lit.value).IsNull() { |
| 444 | return newBoolExpression(lhs, rhs, []byte(" IS ")) |
| 445 | } |
| 446 | return newBoolExpression(lhs, rhs, []byte("=")) |
| 447 | } |
| 448 | |
| 449 | // Returns a representation of "a=b", where b is a literal |
| 450 | func EqL(lhs Expression, val interface{}) BoolExpression { |