[Haskell-cafe] [ANN] relational-record - relational-algebraic query building DSL

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sat May 16 14:35:07 UTC 2015


On Sat, Dec 20, 2014 at 01:50:16AM +0900, Kei Hibino wrote:
> > On Fri, Dec 19, 2014 at 12:39:01PM +0900, Kei Hibino wrote:
> >> From: Manuel Gómez <targen at gmail.com>
> >> Subject: Re: [Haskell-cafe] [ANN] relational-record - relational-algebraic query building DSL
> >> Date: Sun, 14 Dec 2014 12:22:25 -0430
> >>
> >> > On Sun, Dec 14, 2014 at 12:04 PM, Kei Hibino <ex8k.hibino at gmail.com> wrote:
> >> >> I am happy to announce relational-record library and its project page.
> >> >>
> >> >> relational-record is domain specific language for type-safe SQL query building,
> >> >> and database access API with compile time schema generators.
> >> >
> >> > Congratulations on the release!  It’s great to see more and more
> >> > interesting abstractions for relational databases in the Haskell
> >> > ecosystem.
> >> >
> >> > It looks like this project shares many goals with Tom Ellis’ excellent
> >> > and recently released[1] Opaleye library.  How would you say your
> >> > approach compares with Opaleye’s?
> >> >
> >> > [1]: <www.reddit.com/r/haskell/comments/2nxx7n/announcing_opaleye_sqlgenerating_embedded_domain/>
> >>
> >> Relational Record and Opaleye resembles in approach of building
> >> not aggregated SQL query.
> >>
> >> Opaleye's method using arrow notation is very cool.
> >
> > Opaleye uses arrows only because it is hard to implement a sensible
> > semantics otherwise.  See, for example, this bug report on HaskellDB which
> > used a monad rather than an arrow
> >
> >     https://github.com/m4dc4p/haskelldb/issues/22
> 
> In my -- Relational Record -- implementation,
> this issue does not exist like exmaple code below.

Unfortunately I just discovered that Haskell Relational Record suffers from
a worse issue: not just strange semantics, but a (SQL) crash bug:

    https://github.com/khibino/haskell-relational-record/issues/19

Designing a typesafe relational query language is *hard*.  Opaleye is still
the only SQL EDSL I am aware of that has natural semantics and whose design
is typesafe.  Sadly, at least for now, Haskell Relational Record doesn't
meet the second condition.

Tom


More information about the Haskell-Cafe mailing list