arbiter-simple-0.1.0.0
arbiter-simple
Safe HaskellNone
LanguageGHC2024

Arbiter.Simple.MonadArbiter

Description

MonadArbiter primitives backed by postgresql-simple.

Synopsis

Documentation

Source #class Monad m => HasSimplePool (m :: Type -> Type) where

Ambient access to the connection pool.

Instances

Instances details
Monad m => HasSimplePool (SimpleDb registry m) Source # 
Instance details

Defined in Arbiter.Simple.SimpleDb

Source #data SimpleConnectionPool

Pool, pinned connection, and savepoint depth.

MonadArbiter implementation

Source #simpleExecuteQuery :: (HasSimplePool m, MonadUnliftIO m) => Query a -> m [a]

Run a query, decoding rows.

Source #simpleExecuteStatement :: (HasSimplePool m, MonadUnliftIO m) => Query a -> m Int64

Run a statement, returning rows affected.

Source #simpleWithDbTransaction :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a

Transaction bracket. Nests via savepoints.

Source #simpleWithConnection :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a

Pin one pooled connection for the action.

Source #simpleRunHandlerWithConnection :: (HasSimplePool m, MonadUnliftIO m) => (Connection -> job -> m result) -> job -> m result

Run a handler on the pinned connection.