Safe Haskell | None |
---|---|
Language | Haskell2010 |
- query :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => Query n -> r -> m [s]
- query_ :: (MonadRequest b m, FromRow b n r) => Query Zero -> m [r]
- queryWith :: (MonadRequest b m, ToRow b n r) => RowParser b n' s -> Query n -> r -> m [s]
- execute :: (MonadRequest b m, ToRow b n r) => Query n -> r -> m Integer
- execute_ :: MonadRequest b m => Query Zero -> m Integer
- executeMany :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3) => RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m Integer
- executeMany_ :: (MonadRequest b m, ToRow b n r) => RepeatQuery Zero n Zero -> [r] -> m Integer
- returning :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3, FromRow b n s) => RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m [s]
- returningWith :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3, FromRow b n s) => RowParser b n s -> RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m [s]
- returning_ :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => RepeatQuery Zero n Zero -> [r] -> m [s]
- returningWith_ :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => RowParser b n' s -> RepeatQuery Zero n Zero -> [r] -> m [s]
- class MonadSeakaleBase backend m => MonadRequest backend m
- throwSeakaleError :: MonadSeakaleBase backend m => SeakaleError -> m a
- getBackend :: MonadSeakaleBase backend m => m backend
Documentation
query :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => Query n -> r -> m [s] Source #
Replace holes in the query with the provided values and send it to the
database. This is to be used for SELECT
queries.
query_ :: (MonadRequest b m, FromRow b n r) => Query Zero -> m [r] Source #
Like query
but the query should not have any hole.
queryWith :: (MonadRequest b m, ToRow b n r) => RowParser b n' s -> Query n -> r -> m [s] Source #
Provide a way to specify a custom parser for query
.
execute :: (MonadRequest b m, ToRow b n r) => Query n -> r -> m Integer Source #
Replace holes in the query with the provided values, send it to the
database and return the number of rows affected. This is to be used with
DELETE
, UPDATE
and INSERT
queries (without any RETURNING
clause).
execute_ :: MonadRequest b m => Query Zero -> m Integer Source #
Like execute
but the query should not have any hole.
executeMany :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3) => RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m Integer Source #
Like execute
but for a RepeatQuery
where a piece of the query is
repeated as many times as the number of values of type r2
.
executeMany_ :: (MonadRequest b m, ToRow b n r) => RepeatQuery Zero n Zero -> [r] -> m Integer Source #
Like executeMany
but the query should not have any hole before and after
the repeating piece.
returning :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3, FromRow b n s) => RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m [s] Source #
Replace holes in a RepeatQuery
and send it to the database. This is to be
used for INSERT
queries with a RETURNING
clause.
returningWith :: (MonadRequest b m, ToRow b n1 r1, ToRow b n2 r2, ToRow b n3 r3, FromRow b n s) => RowParser b n s -> RepeatQuery n1 n2 n3 -> r1 -> r3 -> [r2] -> m [s] Source #
Provide a way to a custom parser for returning
.
returning_ :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => RepeatQuery Zero n Zero -> [r] -> m [s] Source #
Like returning
but the query should not have any hole before and after
the repeating piece.
returningWith_ :: (MonadRequest b m, ToRow b n r, FromRow b n' s) => RowParser b n' s -> RepeatQuery Zero n Zero -> [r] -> m [s] Source #
Like returningWith
but the query should not have any hole before and
after the repeating piece.
class MonadSeakaleBase backend m => MonadRequest backend m Source #
(MonadRequest backend m, MonadTrans t, MonadSeakaleBase backend (t m)) => MonadRequest backend (t m) Source # | |
Monad m => MonadRequest backend (FreeT (RequestF backend) m) Source # | |
throwSeakaleError :: MonadSeakaleBase backend m => SeakaleError -> m a Source #
getBackend :: MonadSeakaleBase backend m => m backend Source #