From b03fc4fe99c2ce8b1387a81a96d9ac49aa5fe474 Mon Sep 17 00:00:00 2001 From: Parnell Springmeyer Date: Mon, 7 Aug 2023 18:46:45 -0500 Subject: [PATCH] persistent-postgresql: expose `createBackend` ... so that users can construct their own `open'`-like function. --- persistent-postgresql/Database/Persist/Postgresql.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/persistent-postgresql/Database/Persist/Postgresql.hs b/persistent-postgresql/Database/Persist/Postgresql.hs index f255c85c1..0593491bb 100644 --- a/persistent-postgresql/Database/Persist/Postgresql.hs +++ b/persistent-postgresql/Database/Persist/Postgresql.hs @@ -66,6 +66,7 @@ module Database.Persist.Postgresql , createRawPostgresqlPoolModified , createRawPostgresqlPoolModifiedWithVersion , createRawPostgresqlPoolWithConf + , createBackend ) where import qualified Database.PostgreSQL.LibPQ as LibPQ @@ -439,6 +440,8 @@ getSimpleConn = Vault.lookup underlyingConnectionKey <$> getConnVault -- | Create the backend given a logging function, server version, mutable statement cell, -- and connection. +-- +-- @since 2.13.6 createBackend :: LogFunc -> NonEmpty Word -> IORef (Map.Map Text Statement) -> PG.Connection -> SqlBackend createBackend logFunc serverVersion smap conn =