Commit Graph

40 Commits

Author SHA1 Message Date
Felipe Lessa
b1009806ce Set test suite as non-verbose by default. 2012-09-05 16:02:44 -03:00
Felipe Lessa
3b3ef75373 Fix many test suite warnings. 2012-09-05 16:02:11 -03:00
Felipe Lessa
7bb68cc233 Allow any parenthesization of JOINs. 2012-09-05 15:55:59 -03:00
Felipe Lessa
1e19d8625b Implement JOIN and ON clauses. Also add (?.). 2012-09-05 15:38:14 -03:00
Felipe Lessa
80d60bb9b6 Avoid using capitalized "Esqueleto" when referring to the library. 2012-09-04 18:37:02 -03:00
Felipe Lessa
e571513ddb Use insert' everywhere applicable. 2012-09-04 18:34:58 -03:00
Felipe Lessa
0e25e1361c Add test for a many-to-many implicit join. 2012-09-04 18:26:15 -03:00
Felipe Lessa
e35b4a1b21 Fix some warnings about the test suite. 2012-09-04 18:15:09 -03:00
Felipe Lessa
31b4b0669f orderBy, asc, desc. 2012-09-04 18:12:40 -03:00
Felipe Lessa
c601613162 isNothing, just, nothing. 2012-09-04 18:12:25 -03:00
Felipe Lessa
8a601551e4 Whitespace. 2012-09-04 01:10:37 -03:00
Felipe Lessa
15121a7d27 One more test. 2012-09-04 01:10:01 -03:00
Felipe Lessa
a02c68d3bf Some more tests. 2012-09-04 01:02:08 -03:00
Felipe Lessa
df8279b306 Re-export all of GenericSql from Esqueleto. 2012-09-04 01:01:56 -03:00
Felipe Lessa
033e5de6d8 A lot more tests (and testing infrastructure). 2012-09-04 00:47:13 -03:00
Felipe Lessa
bb7775b672 Create a separate sqlSelectColCount. 2012-09-04 00:45:16 -03:00
Felipe Lessa
57c3b403d5 Avoid undefined. 2012-09-04 00:29:39 -03:00
Felipe Lessa
dc6bcda8e4 Correctly consume connection resources. 2012-09-04 00:27:47 -03:00
Felipe Lessa
7ebb2d87bf Throw PersistMarshalError instead of using fail. 2012-09-04 00:27:18 -03:00
Felipe Lessa
f3e47321e2 First version of a test suite. 2012-09-03 23:15:04 -03:00
Felipe Lessa
fdf9985142 Fix parens (silly bug). 2012-09-03 23:13:51 -03:00
Felipe Lessa
979ea1c6d1 Write FROM on the queries. 2012-09-03 23:13:40 -03:00
Felipe Lessa
670eebbc96 fromSingle is internal. 2012-09-03 23:13:19 -03:00
Felipe Lessa
1230245749 Manually avoid spurious warnings.
http://hackage.haskell.org/trac/ghc/ticket/6124
2012-09-03 21:40:28 -03:00
Felipe Lessa
ea4a58a970 Do not export internal functions from Database.Esqueleto. 2012-09-03 21:33:35 -03:00
Felipe Lessa
7420ea1699 Add pun to synopsis. 2012-09-03 20:37:16 -03:00
Felipe Lessa
e1118c7676 Better re-exports (and improved docs). 2012-09-03 18:52:10 -03:00
Felipe Lessa
217b03d22e Export selectSource. 2012-09-03 18:45:20 -03:00
Felipe Lessa
531ca905fd Steal code from rawSql and stop using it.
Unfortunately we can't use rawSql, since we need explicit control
of the SELECT (i.e. we can't use "??").
2012-09-03 18:43:17 -03:00
Felipe Lessa
2986d0996e Nicer 'from' interface.
Instead of

  select $ do
    (x,y,z) <- from
    where_ (z^.f ==. y^.f)
    return (x, y^.f, z)

now you may write

  select $
  from $ \(x,y,z) -> do
    where_ (z^.f ==. y^.f)
    return (x, y^.f, z)

Now the only difference in reading order wrt. SQL is the return
on the bottom of the expression. =)

Note that this does not change at all the expressivity of the
language since

  oldFrom = from return
2012-09-03 17:03:07 -03:00
Felipe Lessa
5bdac55e90 Remove test code from Esqueleto.hs. 2012-09-03 17:02:49 -03:00
Felipe Lessa
3330e6c4ee Doc improvements. 2012-09-03 16:39:01 -03:00
Felipe Lessa
dd417a98e2 Some package re-exports from Esqueleto. 2012-09-03 16:26:42 -03:00
Felipe Lessa
b189791dc3 Use fundeps on SqlSelect.
This allows GHC to infer the type of from by the return of
select.
2012-09-03 16:26:02 -03:00
Felipe Lessa
33d04d5f27 Implement sub. 2012-09-03 15:57:20 -03:00
Felipe Lessa
fe7a32e7e4 Pass escaping function as argument to ERaw (instead of Connection). 2012-09-03 15:53:38 -03:00
Felipe Lessa
a4bd0268aa Change ERaw, more dependent on Connection. 2012-09-03 15:51:12 -03:00
Felipe Lessa
aba36832f6 Second prototype, now using finally tagless style. 2012-09-03 15:42:28 -03:00
Felipe Lessa
acc119e61f Initial skeleton. 2012-09-03 11:38:22 -03:00
Felipe Lessa
c9edc9178e Initial commit. 2012-09-03 09:18:39 -03:00