[database-devel] Please test esqueleto-2.2
Felipe Lessa
felipe.lessa at gmail.com
Mon Apr 27 20:27:10 UTC 2015
Hello!
tl;dr: Please test esqueleto-2.2 by building from master [1,3], and
report back if everything went smoothly [2].
[1] https://github.com/prowdsponsor/esqueleto
[2] https://github.com/prowdsponsor/esqueleto/pull/97
[3] If using cabal sandbox, you could try:
$ git clone https://github.com/prowdsponsor/esqueleto.git
$ cabal sandbox add-source --snapshot esqueleto/
$ cabal install --constraint='esqueleto>=2.2'
Philipp Balzarek recently took a stab at improving Esqueleto's handling
of JOINs [2]. Thanks again, Philipp!
Summary of the changes:
(a) JOIN constructors (e.g. LeftOuterJoin) now associate to the left.
Previously they associated to the right.
(b) Esqueleto's JOIN renderer has been changed to include parenthesis
at the right places, corresponding to the parenthesization used on
Haskell code. Previously it incorrectly ignored explicit parenthesis on
the Haskell code.
Now you can write code such as:
from $ \(p `LeftOuterJoin` (q `InnerJoin` r))
and:
from $ \((p `LeftOuterJoin` q) `InnerJoin` r)
and both should work as expected.
We think that this new version will not trigger any issues, however:
(a) You may be currently relying on the old, bad behavior by accident.
If you currently have queries for which the parenthesization is
relevant, you may want to have unit tests checking for corner cases.
Please double-check any queries with explicit parenthesization.
(b) You may be currently explicitly specifying the type of your JOIN,
which may break due to the new left-associativity. As this isn't a
recommended practice, I don't think anyone is doing it.
I'll wait a couple of weeks before releasing esqueleto-2.2 to Hackage.
Please test you code base against it [1], bugs are cheaper if they're
caught sooner.
Thanks! :)
--
Felipe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/database-devel/attachments/20150427/ae26c545/attachment.sig>
More information about the database-devel
mailing list