arbiter-hasql-0.1.0.0
arbiter-hasql
Safe HaskellNone
LanguageGHC2024

Arbiter.Hasql.Compat

Description

Internal to the arbiter packages. Not covered by the PVP, except for the names that Arbiter.Hasql.HasqlDb re-exports.

Every hasql version difference that arbiter-hasql depends on.

Synopsis

Documentation

runSQL :: Connection -> ByteString -> IO ()Source #

Run a bare SQL command, such as BEGIN or COMMIT.

connectionInTransaction :: Connection -> IO BoolSource #

Whether the connection is in a transaction block, valid or aborted.

withHasqlListenConn :: Connection -> (ListenConn -> IO a) -> IO aSource #

Run the listener loop on the connection's driver handle. The loop runs outside the session.

hasqlSettings :: ByteString -> HasqlSettingsSource #

Convert a connection string ByteString to hasql settings.

type HasqlSettings = SettingsSource #

hasql connection settings.

data HasqlConnectSource #

Connection settings for hasql 2: transport adapter (for example Pqi.Ffi.adapter) and connection string.

toHasqlConnect :: Adapter -> ByteString -> HasqlConnectSource #

Connection settings from a pqi adapter and a connection string. With the hasql2 flag off, the hasql 1.x shape takes only the connection string.

acquireConnect :: HasqlConnect -> IO (Either String Connection)Source #

Open a connection. A failure comes back as its description.

withDedicatedListenConn :: HasqlConnect -> (ListenConn -> IO a) -> IO aSource #

Run the listener loop on a driver connection of its own.