refactor: drop getPool
This commit is contained in:
@@ -9,7 +9,6 @@ module PostgREST.AppState
|
|||||||
, getJsonDbS
|
, getJsonDbS
|
||||||
, getMainThreadId
|
, getMainThreadId
|
||||||
, getPgVersion
|
, getPgVersion
|
||||||
, getPool
|
|
||||||
, getTime
|
, getTime
|
||||||
, getRetryNextIn
|
, getRetryNextIn
|
||||||
, init
|
, init
|
||||||
@@ -95,9 +94,6 @@ initPool :: AppConfig -> IO SQL.Pool
|
|||||||
initPool AppConfig{..} =
|
initPool AppConfig{..} =
|
||||||
SQL.acquire (configDbPoolSize, configDbPoolTimeout, toUtf8 configDbUri)
|
SQL.acquire (configDbPoolSize, configDbPoolTimeout, toUtf8 configDbUri)
|
||||||
|
|
||||||
getPool :: AppState -> SQL.Pool
|
|
||||||
getPool = statePool
|
|
||||||
|
|
||||||
usePool :: AppState -> SQL.Session a -> IO (Either SQL.UsageError a)
|
usePool :: AppState -> SQL.Session a -> IO (Either SQL.UsageError a)
|
||||||
usePool AppState{..} = SQL.use statePool
|
usePool AppState{..} = SQL.use statePool
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user