Felipe Lessa
e91c625ff7
Small doc improvement.
2014-07-07 23:55:38 -03:00
Erik de Castro Lopo
41698518c9
Rename keyE to valJ and fix implementation.
...
As Felipe points out in the PR comments, the implementation can be
simplified to "val . unValue" but the type signature on the function
still prevents anything non-sensical happening.
See: https://github.com/prowdsponsor/esqueleto/pull/69
2014-07-08 10:47:44 +10:00
Erik de Castro Lopo
0b830771ea
Add function keyE.
...
Give a value, keyE lifts the Key for that value into the query expression.
keyE :: Esqueleto query expr backend =>
Value (Key entity) -> expr (Value (Key entity))
2014-07-07 19:52:21 +10:00
Felipe Lessa
46fa0cafcf
Export an unValue function.
2014-05-08 10:55:08 -03:00
Felipe Lessa
b04be7d615
Small doc improvements.
2014-05-08 10:47:51 -03:00
Felipe Lessa
3bd5c8506a
Allow esqueleto's functions to be used on top of transformers.
...
Instead of using SqlPersistT, now it uses MonadSqlPersist.
2014-04-23 11:42:07 -03:00
Felipe Lessa
ab9e57b2d0
Export veryUnsafeCoerceSqlExprValueList ( fixes #62 ).
2014-04-14 14:57:48 -03:00
Felipe Lessa
466de1f96b
Add "since" to rand's doc.
2014-04-08 19:31:51 -03:00
Erik de Castro Lopo
d37331e04d
Implement orderBy[rand] modifier.
2014-04-09 05:56:25 +10:00
David McBride
a21e930259
Conduit no longer exports resourcet related functions.
2014-04-02 11:52:23 -04:00
Felipe Lessa
67522cecbc
Bump version to 1.3.6.
2014-04-02 11:45:32 -03:00
Felipe Lessa
3ed5930063
Merge pull request #54 from tlaitinen/master
...
unsafeSqlExtractSubField to support EXTRACT subfield FROM field-syntax
2014-04-02 11:39:23 -03:00
Tero Laitinen
69b4be6e37
unsafeSqlExtractSubField to support EXTRACT subfield FROM field-syntax
2014-04-02 17:30:28 +03:00
Felipe Lessa
5192a2b98e
Fix typo on doc ( closes #36 ).
2014-03-04 09:51:50 -03:00
Felipe Lessa
0de8242634
Use persistent 1.3+ new limit/offset func ( closes #35 ).
...
This code was actually written by @gbwey and it's being
manually merged with some changes by me.
2014-03-04 09:25:14 -03:00
Felipe Lessa
9fdf296367
Merge pull request #31 from jcristovao/master
...
sum function does not return the same type it receives
2014-03-04 09:08:34 -03:00
Felipe Lessa
f04e277a2d
Rewrite insertSelect so that it properly escapes names ( fixes #47 ).
2014-03-04 09:02:18 -03:00
Tero Laitinen
f3ff39e898
export SqlSelect class functions to allow creating instances to select more than 16 fields
2013-11-18 14:40:34 +02:00
João Cristóvão
753e4bccac
Added num class restriction to random, round_, floor_.
2013-09-19 09:30:16 +01:00
João Cristóvão
0033050806
Merge branch 'master' of github.com:meteficha/esqueleto
2013-09-15 21:57:04 +01:00
Michael Snoyman
f2c2a4ff2e
Fix Haddocks
2013-09-15 14:13:49 +03:00
Felipe Lessa
33b1fafc2d
Thread IdentState through subqueries ( fixes #28 ).
...
There used to be name clashes if a subquery referenced
an entity that was already being used on the outer query.
Now we thread the outer query's IdentState to its subqueries,
which use it instead of initialIdentState.
Note that clashes still may occur between subqueries of
a query, but I think that's harmless.
2013-09-15 04:16:35 -03:00
Felipe Lessa
c5c76959bd
Move public insertSelect API to Language module.
2013-09-15 04:03:40 -03:00
Felipe Lessa
a7d8c99213
Re-order exports related to insertSelect.
2013-09-15 03:52:10 -03:00
Felipe Lessa
53402d726f
Add some documentaion to SqlExpr.
2013-09-15 03:27:12 -03:00
Felipe Lessa
e8013a93d4
Saner implementation of existsHelper.
2013-09-15 02:17:29 -03:00
João Cristóvão
161621cbd4
sum_ result type may not be the same as the parameters type.
2013-09-11 10:48:12 +01:00
Danny B
d6d528d5a9
Fix underscore.
2013-08-09 14:56:19 +11:00
Danny B
452861de78
Fix comma.
2013-08-09 09:06:48 +11:00
Danny B
e77e056f5b
Handle NULL result in avg_ too.
2013-08-08 16:46:01 +11:00
Danny B
068ec9b1ae
Proper NULL handling in max_, min_ and sum_.
...
- return expr (Value (Maybe a))
- add joinV to join nested Maybes in an expr
2013-08-08 15:51:31 +11:00
Danny B
83dc4a433c
Make max_, min_ and sum_ less general.
2013-08-07 15:27:29 +11:00
Sam Anklesaria
3641f36326
added tests for math and aggregation functions
2013-07-03 15:46:22 +09:00
Sam Anklesaria
4377f2cffa
fixed a typo
2013-07-02 19:47:18 +09:00
Sam Anklesaria
024537b592
Merge branch 'master' of git://github.com/meteficha/esqueleto
2013-07-02 19:40:28 +09:00
Sam Anklesaria
30c321ee03
common math and aggregation sql functions
2013-07-02 19:39:17 +09:00
Felipe Lessa
66e67e1cff
Final touchs on docs.
2013-07-01 11:06:53 -03:00
Sam Anklesaria
dc5baefd48
No more MPTCs, added documentation
2013-06-30 11:44:24 +09:00
Sam Anklesaria
ee8656adf0
insert select statements
2013-06-22 23:48:08 +09:00
Felipe Lessa
d056545c3e
Bump version to 1.2.2.
2013-05-20 12:35:54 -03:00
Takahiro HIMURA
893f1cd54b
Add HAVING support.
2013-05-19 08:21:52 +09:00
Felipe Lessa
f0ae243f5f
Fix support for "return ()" inside a select.
2013-05-17 14:32:33 -03:00
Felipe Lessa
f6969d5971
Avoid double commas (fixes test suite).
2013-05-17 14:23:07 -03:00
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
fd75d3014a
Add newline to the end of Sql.hs.
2013-04-09 11:37:54 -03:00
azafeh
d294caa2ac
mais instâncias de tuple
2013-04-08 22:40:20 -03:00
Mitsutoshi Aoe
b6fe3c0bb6
Do not discard vals in count
2013-03-08 10:09:30 +09: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