Merge branch 'master' into matt/persistent-2.12
This commit is contained in:
commit
651380fc80
@ -4,6 +4,12 @@
|
||||
- [#243](https://github.com/bitemyapp/esqueleto/pull/243)
|
||||
- Support `persistent-2.12`
|
||||
|
||||
3.4.1.1
|
||||
=======
|
||||
- @MaxGabriel
|
||||
- [#240](https://github.com/bitemyapp/esqueleto/pull/240/files)
|
||||
- Improve recommend hlint to avoid doing `x = NULL` SQL queries
|
||||
|
||||
3.4.1.0
|
||||
=======
|
||||
- @arthurxavierx
|
||||
|
||||
@ -622,10 +622,10 @@ val v = ERaw Never $ const ("?", [toPersistValue v])
|
||||
-- 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 ==. nothing, rhs: Database.Esqueleto.isNothing v, name: Use Esqueleto's isNothing}
|
||||
-- > - error: {lhs: v ==. val Nothing, rhs: Database.Esqueleto.isNothing v, name: Use Esqueleto's isNothing}
|
||||
-- > - error: {lhs: v !=. nothing, rhs: not_ (Database.Esqueleto.isNothing v), name: Use Esqueleto's not isNothing}
|
||||
-- > - error: {lhs: v !=. val Nothing, rhs: not_ (Database.Esqueleto.isNothing v), name: Use Esqueleto's not isNothing}
|
||||
-- > - 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}
|
||||
isNothing :: PersistField typ => SqlExpr (Value (Maybe typ)) -> SqlExpr (Value Bool)
|
||||
isNothing v =
|
||||
case v of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user