
23 Nov
2012
23 Nov
'12
6:16 a.m.
Le 23/11/12 12:04, Erik de Castro Lopo a écrit :
Francesco Mazzoli wrote:
Have you looked at http://hackage.haskell.org/packages/archive/esqueleto/0.2.8/doc/html/Databas...? I didn’t try, but it looks promising. The examples in that section still suggest that the SELECT statement that is run against the database returns an element for each row whereas the what I'm hoping for is a single element returned, the row count.
Erik Never played with Esqueleto, but it looks to me like the following would work:
count <- select $ from \foo -> do return countRows