Upgrade to fast new hasql (#836)
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ dependencies:
|
|||||||
- stack setup
|
- stack setup
|
||||||
- rm -fr $(stack path --dist-dir) $(stack path --local-install-root)
|
- rm -fr $(stack path --dist-dir) $(stack path --local-install-root)
|
||||||
- stack install hlint packdeps cabal-install
|
- stack install hlint packdeps cabal-install
|
||||||
- stack build --fast
|
- stack build --fast -j1
|
||||||
- stack build --fast --test --no-run-tests
|
- stack build --fast --test --no-run-tests
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
+1
-1
@@ -142,7 +142,7 @@ Test-Suite spec
|
|||||||
, hasql-pool
|
, hasql-pool
|
||||||
, heredoc
|
, heredoc
|
||||||
, hjsonpointer
|
, hjsonpointer
|
||||||
, hjsonschema
|
, hjsonschema == 1.5.0.1
|
||||||
, hspec
|
, hspec
|
||||||
, hspec-wai >= 0.7.0
|
, hspec-wai >= 0.7.0
|
||||||
, hspec-wai-json
|
, hspec-wai-json
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
|
||||||
--module PostgREST.App where
|
|
||||||
module PostgREST.App (
|
module PostgREST.App (
|
||||||
postgrest
|
postgrest
|
||||||
) where
|
) where
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-|
|
{-|
|
||||||
Module : PostgREST.QueryBuilder
|
Module : PostgREST.QueryBuilder
|
||||||
@@ -149,7 +148,7 @@ callProc :: QualifiedIdentifier -> JSON.Object -> Bool -> SqlQuery -> SqlQuery -
|
|||||||
callProc qi params returnsScalar selectQuery countQuery _ countTotal isSingle paramsAsJson asCsv asBinary binaryField =
|
callProc qi params returnsScalar selectQuery countQuery _ countTotal isSingle paramsAsJson asCsv asBinary binaryField =
|
||||||
unicodeStatement sql HE.unit decodeProc True
|
unicodeStatement sql HE.unit decodeProc True
|
||||||
where
|
where
|
||||||
sql =
|
sql =
|
||||||
if returnsScalar then [qc|
|
if returnsScalar then [qc|
|
||||||
WITH {sourceCTEName} AS ({_callSql})
|
WITH {sourceCTEName} AS ({_callSql})
|
||||||
SELECT
|
SELECT
|
||||||
@@ -157,7 +156,7 @@ callProc qi params returnsScalar selectQuery countQuery _ countTotal isSingle pa
|
|||||||
1 AS page_total,
|
1 AS page_total,
|
||||||
{scalarBodyF} as body
|
{scalarBodyF} as body
|
||||||
FROM ({selectQuery}) _postgrest_t;|]
|
FROM ({selectQuery}) _postgrest_t;|]
|
||||||
else [qc|
|
else [qc|
|
||||||
WITH {sourceCTEName} AS ({_callSql})
|
WITH {sourceCTEName} AS ({_callSql})
|
||||||
SELECT
|
SELECT
|
||||||
{countResultF} AS total_result_set,
|
{countResultF} AS total_result_set,
|
||||||
|
|||||||
+3
-1
@@ -1,8 +1,10 @@
|
|||||||
resolver: lts-8.5
|
resolver: lts-9.0
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- configurator-ng-0.0.0.1
|
- configurator-ng-0.0.0.1
|
||||||
- critbit-0.2.0.0
|
- critbit-0.2.0.0
|
||||||
- hasql-pool-0.4.1
|
- hasql-pool-0.4.1
|
||||||
|
- hjsonpointer-1.1.1
|
||||||
|
- hjsonschema-1.5.0.1
|
||||||
- jose-0.5.0.3
|
- jose-0.5.0.3
|
||||||
- Ranged-sets-0.3.0
|
- Ranged-sets-0.3.0
|
||||||
ghc-options:
|
ghc-options:
|
||||||
|
|||||||
Reference in New Issue
Block a user