Commit Graph

152 Commits

Author SHA1 Message Date
Alberto Valverde
923a973abe Removed (some) warnings 2014-12-29 18:52:01 +01:00
Alberto Valverde
ad409312cf Support non-id primary key joins with columns not declared as ForeignKey but of ParentId type 2014-12-29 17:49:08 +01:00
Alberto Valverde
477c0a4c21 handle non-id/composite primary keys on ==. and !=. 2014-12-29 15:05:57 +01:00
Alberto Valverde
1f80074b6e Revert "Revert "custom primary keys (not composite, yet) supported on projections""
This reverts commit 761ef03b03.
2014-12-24 05:27:10 +01:00
Alberto Valverde
761ef03b03 Revert "custom primary keys (not composite, yet) supported on projections"
This reverts commit 3f31f41a71.
2014-12-23 23:57:03 +01:00
Alberto Valverde
3f31f41a71 custom primary keys (not composite, yet) supported on projections 2014-12-23 21:24:41 +01:00
Alberto Valverde
cc4844167f Implemented support for custom/composite primary keys 2014-12-23 14:13:07 +01:00
Josh Berman
8579010409 INSERT INTO SELECT typo 2014-11-17 17:19:45 +02:00
Felipe Lessa
40c4528540 Bump version to 2.1.2. 2014-11-03 12:27:46 -02:00
Felipe Lessa
88553f657d Punctuation. 2014-11-03 12:27:25 -02:00
Paul Berens
ebe9185ef2 Test improvement and documentation improvements 2014-11-02 14:50:30 -08:00
Paul Berens
d690e0b425 Implement CASE support
* This seems to work but I don't have in-depth tests yet
 * I seem to still have some oddity here and there which needs to be
 nailed down
 * This only implements the "full" CASE syntax, not the simplified, and
 it makes ELSE mandatory, (its optional with CASE)
2014-11-02 01:31:54 -07:00
Michael Snoyman
05fbbba86a Support for persistent 2.0.8 2014-09-28 07:05:41 +03:00
Michael Snoyman
bcb620026f Support persistent 2.0.5 2014-09-21 21:34:09 +03:00
Michael Snoyman
2af4aaf37d Fix for #74 2014-09-18 08:40:05 +03:00
Michael Snoyman
4febf46c6a Merge branch 'persistent2' of github.com:fpco/esqueleto
Conflicts:
	esqueleto.cabal
	src/Database/Esqueleto.hs
2014-09-08 09:05:57 +03:00
Michael Snoyman
30964d950d More persistent2 updates 2014-08-27 11:27:36 +03:00
Felipe Lessa
fb36a603f8 isNull doesn't exist :). 2014-07-16 17:14:05 -03:00
Felipe Lessa
ba577a0111 Functor Value. 2014-07-12 12:00:54 -03:00
Felipe Lessa
bfdb140e46
Bump version to 1.4.3. 2014-07-12 00:27:23 -03:00
Mitchell Rosen
22f03c2e39 change coalesceDefault argument order 2014-07-11 19:51:01 -07:00
Mitchell Rosen
e735378f90 added coalesce/coalesceDefault functions 2014-07-11 16:03:04 -07:00
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
Michael Snoyman
2685cdb7f7 Merge branch 'master' of github.com:meteficha/esqueleto into HEAD
Conflicts:
	esqueleto.cabal
	src/Database/Esqueleto/Internal/Sql.hs
2014-05-26 16:34:34 +03: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
Michael Snoyman
d47a1a00e3 resourcet 1.1 2014-04-18 14:53:50 +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
Michael Snoyman
7f6ae061da persistent2 2014-01-16 08:24:43 +02: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