refactor: drop getPool

This commit is contained in:
Robert Vollmert
2022-08-02 09:24:14 +02:00
committed by Robert
parent 1d15060c63
commit d4950c6460
-4
View File
@@ -9,7 +9,6 @@ module PostgREST.AppState
, getJsonDbS
, getMainThreadId
, getPgVersion
, getPool
, getTime
, getRetryNextIn
, init
@@ -95,9 +94,6 @@ initPool :: AppConfig -> IO SQL.Pool
initPool AppConfig{..} =
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.use statePool