Returns a representation of "a!=b"
(lhs, rhs Expression)
| 453 | |
| 454 | // Returns a representation of "a!=b" |
| 455 | func Neq(lhs, rhs Expression) BoolExpression { |
| 456 | lit, ok := rhs.(*literalExpression) |
| 457 | if ok && sqltypes.Value(lit.value).IsNull() { |
| 458 | return newBoolExpression(lhs, rhs, []byte(" IS NOT ")) |
| 459 | } |
| 460 | return newBoolExpression(lhs, rhs, []byte("!=")) |
| 461 | } |
| 462 | |
| 463 | // Returns a representation of "a!=b", where b is a literal |
| 464 | func NeqL(lhs Expression, val interface{}) BoolExpression { |
no test coverage detected