Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- queryResult :: (MonadDB m, MonadThrow m, FromRow row) => m (QueryResult row)
- foldrDB :: (MonadDB m, FromRow row) => (row -> acc -> m acc) -> acc -> m acc
- foldlDB :: (MonadDB m, FromRow row) => (acc -> row -> m acc) -> acc -> m acc
- mapDB_ :: (MonadDB m, FromRow row) => (row -> m t) -> m ()
- fetchMany :: (MonadDB m, FromRow row) => (row -> t) -> m [t]
- fetchMaybe :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m (Maybe t)
- fetchOne :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m t
Documentation
queryResult :: (MonadDB m, MonadThrow m, FromRow row) => m (QueryResult row) Source #
Get current QueryResult
or throw an exception if there isn't one.
foldrDB :: (MonadDB m, FromRow row) => (row -> acc -> m acc) -> acc -> m acc Source #
Specialization of foldrM
for convenient query results fetching.
foldlDB :: (MonadDB m, FromRow row) => (acc -> row -> m acc) -> acc -> m acc Source #
Specialization of foldlM
for convenient query results fetching.
mapDB_ :: (MonadDB m, FromRow row) => (row -> m t) -> m () Source #
Specialization of mapM_
for convenient mapping over query results.
fetchMany :: (MonadDB m, FromRow row) => (row -> t) -> m [t] Source #
Specialization of foldrDB
that fetches a list of rows.
fetchMaybe :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m (Maybe t) Source #
Specialization of foldlDB
that fetches one or zero rows. If
more rows are delivered, AffectedRowsMismatch
exception is thrown.
fetchOne :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m t Source #
Specialization of fetchMaybe
that fetches exactly one row. If
no row is delivered, AffectedRowsMismatch
exception is thrown.