refactor: OpenAPI as Response submodule

* body after dbstructure
* rename runPgLocals to setPgLocals
This commit is contained in:
steve-chavez
2022-10-01 11:05:49 -05:00
committed by Steve Chavez
parent f54dc2e20e
commit fd67c8480c
5 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ module PostgREST.Query
, singleUpsertQuery
, txMode
, updateQuery
, runPgLocals
, setPgLocals
, DbHandler
) where
@@ -228,9 +228,9 @@ failsChangesOffLimits (Just maxChanges) RSStandard{rsQueryTotal=queryTotal} =
throwError $ Error.OffLimitsChangesError queryTotal maxChanges
-- | Runs local(transaction scoped) GUCs for every request, plus the pre-request function
runPgLocals :: AppConfig -> KM.KeyMap JSON.Value -> Text ->
setPgLocals :: AppConfig -> KM.KeyMap JSON.Value -> Text ->
ApiRequest -> ByteString -> PgVersion -> DbHandler ()
runPgLocals conf claims role req jsonDbS actualPgVersion = do
setPgLocals conf claims role req jsonDbS actualPgVersion = do
lift $ SQL.statement mempty $ SQL.dynamicallyParameterized
("select " <> intercalateSnippet ", " (searchPathSql : roleSql ++ claimsSql ++ [methodSql, pathSql] ++ headersSql ++ cookiesSql ++ appSettingsSql ++ specSql))
HD.noResult (configDbPreparedStatements conf)