equals method
Compare this expression to value
using =
in SQL coalesced to FALSE
.
This is equivalent to COALESCE(this = value, FALSE)
in SQL.
The .equals
extension method requires that one of the two operators
are non-nullable. Because NULL = NULL
evaluates to UNKNOWN
in SQL,
which is surprising in a Dart context.
If you wish to compare two nullable expressions you can use:
- isNotDistinctFrom, to get
NULL
equivalent toNULL
, or, - equalsUnlessNull, to explicitely get the SQL
=
semantics.
Implementation
Expr<bool> equals(Expr<String> value) =>
ExpressionEquals(this, value).orElseValue(false);