Merge branch 'master' of github.com:bitemyapp/esqueleto
This commit is contained in:
commit
afdc7f792b
@ -192,7 +192,7 @@ which generates this SQL:
|
|||||||
SELECT P1.*, Follow.*, P2.*
|
SELECT P1.*, Follow.*, P2.*
|
||||||
FROM Person AS P1
|
FROM Person AS P1
|
||||||
INNER JOIN Follow ON P1.id = Follow.follower
|
INNER JOIN Follow ON P1.id = Follow.follower
|
||||||
INNER JOIN P2 ON P2.id = Follow.followed
|
INNER JOIN Person AS P2 ON P2.id = Follow.followed
|
||||||
```
|
```
|
||||||
|
|
||||||
Note carefully that the order of the ON clauses is reversed! You're required to write your `on`s in reverse order because that helps composability (see the documentation of `on` for more details).
|
Note carefully that the order of the ON clauses is reversed! You're required to write your `on`s in reverse order because that helps composability (see the documentation of `on` for more details).
|
||||||
|
|||||||
@ -311,7 +311,7 @@ import qualified Database.Persist
|
|||||||
-- SELECT P1.*, Follow.*, P2.*
|
-- SELECT P1.*, Follow.*, P2.*
|
||||||
-- FROM Person AS P1
|
-- FROM Person AS P1
|
||||||
-- INNER JOIN Follow ON P1.id = Follow.follower
|
-- INNER JOIN Follow ON P1.id = Follow.follower
|
||||||
-- INNER JOIN P2 ON P2.id = Follow.followed
|
-- INNER JOIN Person AS P2 ON P2.id = Follow.followed
|
||||||
-- @
|
-- @
|
||||||
--
|
--
|
||||||
-- In @esqueleto@, we may write the same query above as:
|
-- In @esqueleto@, we may write the same query above as:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user