arbiter-hasql-0.1.0.0: Hasql backend for arbiter
Safe HaskellNone
LanguageGHC2024

Arbiter.Hasql.Compat

Description

Compatibility layer for hasql API differences.

All version-specific code lives here. The rest of arbiter-hasql imports from this module and never uses CPP directly.

Synopsis

Documentation

runSQL :: MonadUnliftIO m => Connection -> ByteString -> m () Source #

Run a simple SQL command on a hasql connection (e.g., BEGIN, COMMIT).

connectionInTransaction :: Connection -> IO Bool Source #

Returns True if the connection is in a transaction block (valid or aborted) and False if it is idle. Used to skip a redundant ROLLBACK when hasql has already cleaned up after an interrupted session.

hasqlSettings :: ByteString -> HasqlSettings Source #

Convert a connection string ByteString to hasql settings.

type HasqlSettings = Settings Source #