Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- queryResult :: (HasCallStack, MonadDB m, MonadThrow m, FromRow row) => m (QueryResult row)
- foldrDB :: (HasCallStack, MonadDB m, FromRow row) => (row -> acc -> m acc) -> acc -> m acc
- foldlDB :: (HasCallStack, MonadDB m, FromRow row) => (acc -> row -> m acc) -> acc -> m acc
- mapDB_ :: (HasCallStack, MonadDB m, FromRow row) => (row -> m r) -> m ()
- fetchMany :: (HasCallStack, MonadDB m, FromRow row) => (row -> t) -> m [t]
- fetchMaybe :: (HasCallStack, MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m (Maybe t)
- fetchOne :: (HasCallStack, MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m t
Documentation
queryResult :: (HasCallStack, MonadDB m, MonadThrow m, FromRow row) => m (QueryResult row) Source #
Get current QueryResult
or throw an exception if there isn't one.
foldrDB :: (HasCallStack, MonadDB m, FromRow row) => (row -> acc -> m acc) -> acc -> m acc Source #
Fetcher of rows returned by a query as a monadic right fold.
foldlDB :: (HasCallStack, MonadDB m, FromRow row) => (acc -> row -> m acc) -> acc -> m acc Source #
Fetcher of rows returned by a query as a monadic left fold.
mapDB_ :: (HasCallStack, MonadDB m, FromRow row) => (row -> m r) -> m () Source #
Fetcher of rows returned by a query as a monadic map.
fetchMany :: (HasCallStack, MonadDB m, FromRow row) => (row -> t) -> m [t] Source #
Specialization of foldrDB
that fetches a list of rows.
fetchMaybe :: (HasCallStack, 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 :: (HasCallStack, 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.