Selecting a user with their profile pic (from GraphQL introduction).
{
user(id: 3500401) {
id,
name,
isViewerFriend,
profilePicture(size: 50) {
uri,| diff --git a/src/PostgREST/App.hs b/src/PostgREST/App.hs | |
| index d1d27b4..abf3d8f 100644 | |
| --- a/src/PostgREST/App.hs | |
| +++ b/src/PostgREST/App.hs | |
| @@ -53,6 +53,7 @@ import PostgREST.QueryBuilder ( callProc | |
| , addRelations | |
| , createReadStatement | |
| , createWriteStatement | |
| + , lockRowExclusive | |
| , ResultsWithCount |
| diff --git a/src/PostgREST/App.hs b/src/PostgREST/App.hs | |
| index d1d27b4..b701501 100644 | |
| --- a/src/PostgREST/App.hs | |
| +++ b/src/PostgREST/App.hs | |
| @@ -53,6 +53,7 @@ import PostgREST.QueryBuilder ( callProc | |
| , addRelations | |
| , createReadStatement | |
| , createWriteStatement | |
| + , lockRowExclusive | |
| , ResultsWithCount |
| 2016-02-08 13:47:45.472 PST,"j","demo1",90926,"::1:49581",56b90d00.1632e,1,"idle",2016-02-08 13:47:44 PST,2/88,0,LOG,00000,"statement: SET client_encoding = 'UTF8';SET client_min_messages TO WARNING;",,,,,,,,,"" | |
| 2016-02-08 13:47:45.972 PST,"j","demo1",90926,"::1:49581",56b90d00.1632e,2,"idle",2016-02-08 13:47:44 PST,2/89,0,LOG,00000,"statement: begin ISOLATION LEVEL READ COMMITTED;",,,,,,,,,"" | |
| 2016-02-08 13:47:47.979 PST,"j","demo1",90927,"::1:49586",56b90d02.1632f,1,"idle",2016-02-08 13:47:46 PST,3/16,0,LOG,00000,"statement: SET client_encoding = 'UTF8';SET client_min_messages TO WARNING;",,,,,,,,,"" | |
| 2016-02-08 13:47:48.479 PST,"j","demo1",90927,"::1:49586",56b90d02.1632f,2,"idle",2016-02-08 13:47:46 PST,3/17,0,LOG,00000,"statement: begin ISOLATION LEVEL READ COMMITTED;",,,,,,,,,"" | |
| 2016-02-08 13:47:50.485 PST,"j","demo1",90928,"::1:49587",56b90d05.16330,1,"idle",2016-02-08 13:47:49 PST,4/89,0,LOG,00000,"statement: SET client_encoding = 'UTF8';SET client_min_messages TO WARNING;",,,,,,,,,"" | |
| 2016-02-08 13:47:5 |
| Current filetype: haskell | |
| filetype detection:ON plugin:ON indent:ON | |
| ghcmod.vim version: 1.3.1 | |
| ghc-mod is executable: 1 | |
| vimproc.vim: 902 | |
| ghc-mod version: 5.4.0 | |
| ghc-mod debug command: ghc-mod debug | |
| Root directory: /root/hasql | |
| Current directory: /root/hasql | |
| GHC Package flags: |
| module Main where | |
| import Control.Monad (replicateM_) | |
| import Hasql.Connection | |
| import Hasql.Session | |
| import Hasql.Query | |
| main :: IO () | |
| main = do | |
| acquire "postgres://postgres@localhost:5432/demo1" >>= \case |
| -- JSON FESTIVAL | |
| WITH pg_source AS | |
| (SELECT "public"."festival".* FROM "public"."festival") | |
| SELECT | |
| (SELECT pg_catalog.Count(1) FROM "public"."festival") AS total_result_set, | |
| pg_catalog.Count(t) AS page_total, | |
| NULL AS header, | |
| Array_to_json(Array_agg(Row_to_json(t)))::character VARYING AS body | |
| FROM |
| Leo Ornstein - Sonata No. 8, Mvt. 2c | |
| Satie - Descriptions automatiques | |
| Mompou - Musica Callada, first song | |
| Poulenc - Suite française, 2nd mvmt, specificially Bransle de Champagne | |
| Rodrigo - Berceuse d'automne | |
| Blancafort - Cançó en l'Ermita | |
| Severac - En Vacances 4th song | |
| Percy Grainger - Walking Tune (at least the start) | |
| George Enescu - Suite no.3, Op.18, “Pièces impromptues” | |
| Copland - Midsummer Nocturne |
Selecting a user with their profile pic (from GraphQL introduction).
{
user(id: 3500401) {
id,
name,
isViewerFriend,
profilePicture(size: 50) {
uri,| module Lib | |
| ( someFunc | |
| ) where | |
| import Control.Monad | |
| import Data.Int | |
| import Data.Monoid | |
| import Data.Functor.Contravariant | |
| import Hasql.Connection | |
| import Hasql.Session |
| diff --git a/test/Feature/AuthSpec.hs b/test/Feature/AuthSpec.hs | |
| index f678ae2..6f7d8bb 100644 | |
| --- a/test/Feature/AuthSpec.hs | |
| +++ b/test/Feature/AuthSpec.hs | |
| @@ -6,13 +6,14 @@ import Test.Hspec.Wai | |
| import Test.Hspec.Wai.JSON | |
| import Network.HTTP.Types | |
| import qualified Hasql.Connection as H | |
| +import Data.Pool | |