Commit Graph

34 Commits

Author SHA1 Message Date
Felipe Lessa
1e633a8dd9 Upgrade to persistent 1.2 and bump version to 1.2.
Note that version 1.1 was skipped for the sake of bringing
esqueleto's version to parity with persistent's.
2013-04-29 18:21:44 -03:00
Felipe Lessa
8f6fe37027 Update monad-logger dep. 2013-03-12 12:13:38 -03:00
Mitsutoshi Aoe
0889709403 Add support for COUNT(expr) 2013-03-07 20:04:43 +09:00
Felipe Lessa
51c08ed0e8 Add deleteCount and updateCount (fixes #10). 2013-02-12 13:09:30 -02:00
Felipe Lessa
745c5cd276 Allow complex ORDER BYs by correctly putting parenthesis. 2013-01-27 21:16:07 -02:00
Felipe Lessa
6d8b84c55c valList [] now works. 2013-01-27 17:28:00 -02:00
Felipe Lessa
9db4408d7c Use persistent 1.1. 2012-12-14 12:12:05 -02:00
Felipe Lessa
5514f68994 Support for IN and NOT IN. 2012-11-28 18:23:52 -02:00
Felipe Lessa
4769d30b18 Add support for EXISTS and NOT EXISTS. 2012-11-28 18:23:07 -02:00
Felipe Lessa
94b19267ee New functions limit and offset. 2012-09-09 14:28:28 -03:00
Felipe Lessa
5a0974f4c0 New text-related functions like, (%), concat_ and (++.). 2012-09-09 12:20:15 -03:00
Felipe Lessa
f718be86da Instead of using rawSql's Single, use a new data type Value.
First of all, Value is a nicer name than Single.

However the main reason is to avoid error calls and to get better
feedback about the code from GHC.  Because of the GHC bug #6124,
we had many calls to 'error' just to avoid spurious warnings.  By
using data (instead of newtype) for Value we're able to avoid
them.  This commit removes *19* error calls from Sql.hs that GHC
is now able to prove that are unreachable.
2012-09-06 01:40:52 -03:00
Felipe Lessa
df63cd864b COUNT(*). 2012-09-05 23:18:56 -03:00
Felipe Lessa
0f677e9246 Add UPDATE support. 2012-09-05 23:09:02 -03:00
Felipe Lessa
a29183028b New DELETE support. 2012-09-05 20:34:24 -03:00
Felipe Lessa
dad271a75a Prettify LANGUAGE pragmas. 2012-09-05 19:16:28 -03:00
Felipe Lessa
9a24c7774c Allow SELECT DISTINCT queries as well. 2012-09-05 19:14:03 -03:00
Felipe Lessa
80227e120e Add a test for a many-to-many query with LEFT OUTER JOINs. 2012-09-05 16:58:27 -03:00
Felipe Lessa
eda13692cf Add test for explicit many-to-many JOIN (currently failing). 2012-09-05 16:46:52 -03:00
Felipe Lessa
840ff23325 Add a test suite category just for JOINs. 2012-09-05 16:03:43 -03:00
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
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
033e5de6d8 A lot more tests (and testing infrastructure). 2012-09-04 00:47:13 -03:00
Felipe Lessa
f3e47321e2 First version of a test suite. 2012-09-03 23:15:04 -03:00