IS NULL comparison.
For
IS NOT NULL, you can negate this with
not_, as in
not_ (isNothing (person ^. PersonAge))
Warning: Persistent and Esqueleto have different behavior for
!=
Nothing:
TODO: table
In SQL,
= NULL and
!= NULL return NULL instead of
true or false. For this reason, you very likely do not want to use
!=. Nothing in Esqueleto. You may find these
hlint rules helpful to enforce this:
- error: {lhs: v Database.Esqueleto.==. Database.Esqueleto.nothing, rhs: Database.Esqueleto.isNothing v, name: Use Esqueleto's isNothing}
- error: {lhs: v Database.Esqueleto.==. Database.Esqueleto.val Nothing, rhs: Database.Esqueleto.isNothing v, name: Use Esqueleto's isNothing}
- error: {lhs: v Database.Esqueleto.!=. Database.Esqueleto.nothing, rhs: not_ (Database.Esqueleto.isNothing v), name: Use Esqueleto's not isNothing}
- error: {lhs: v Database.Esqueleto.!=. Database.Esqueleto.val Nothing, rhs: not_ (Database.Esqueleto.isNothing v), name: Use Esqueleto's not isNothing}