Merge branch 'matt/render-query' of github.com:bitemyapp/esqueleto into matt/render-query

This commit is contained in:
parsonsmatt 2019-09-20 10:41:29 -06:00
commit 3801155f1b
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ addons:
env:
global:
- PGPORT=5433
- PGPORT=5432
matrix:
- GHCVER=8.2
- GHCVER=8.4
@ -28,7 +28,7 @@ install:
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- stack --version
- echo "CREATE USER esqutest WITH PASSWORD 'esqutest';" | psql postgres
- psql -c "CREATE USER esqutest WITH PASSWORD 'esqutest';" -U postgres
- createdb -O esqutest esqutest
- mysql -e 'CREATE DATABASE esqutest;'

View File

@ -157,8 +157,8 @@ However, you may want your results to include people who don't have any blog pos
```haskell
select $
from $ \(p `LeftOuterJoin`` mb) -> do
on (p ^. PersonId ==. mb ?. BlogPostAuthorId)
from $ \(p `LeftOuterJoin` mb) -> do
on (just (p ^. PersonId) ==. mb ?. BlogPostAuthorId)
orderBy [asc (p ^. PersonName), asc (mb ?. BlogPostTitle)]
return (p, mb)
```

View File

@ -238,4 +238,4 @@ main = do
where
say :: (MonadIO m, Show a) => a -> m ()
say = liftIO . print
connection = "host=localhost port=5433 user=postgres dbname=esqueleto_blog_example password=***"
connection = "host=localhost port=5432 user=postgres dbname=esqueleto_blog_example password=***"

View File

@ -1057,7 +1057,7 @@ migrateIt = do
withConn :: RunDbMonad m => (SqlBackend -> R.ResourceT m a) -> m a
withConn =
R.runResourceT . withPostgresqlConn "host=localhost port=5433 user=esqutest password=esqutest dbname=esqutest"
R.runResourceT . withPostgresqlConn "host=localhost port=5432 user=esqutest password=esqutest dbname=esqutest"
-- | Show the SQL generated by a query
showQuery :: (Monad m, ES.SqlSelect a r, BackendCompatible SqlBackend backend)