Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is dedicated to dealing with query results.
Synopsis
- data Result a
- runResultPq :: MonadIO m => Result -> Result a -> m (Either Errors a)
- ignored :: Result ()
- single :: Row a -> Result a
- first :: Row a -> Result a
- many :: Row a -> Result (Vector a)
- affectedRows :: Result Integer
- checkForError :: (MonadIO m, MonadError ResultErrors m) => Connection -> Maybe Result -> m Result
Documentation
Query result
Since: 0.0.0
runResultPq :: MonadIO m => Result -> Result a -> m (Either Errors a) Source #
Process libpq's Result
.
Since: 0.0.0
Combinators
first :: Row a -> Result a Source #
Process only the first row. There may be more rows in the result set, but they won't be touched.
Since: 0.0.0
affectedRows :: Result Integer Source #
Get the number of affected rows.
Since: 0.0.0
Validation
checkForError :: (MonadIO m, MonadError ResultErrors m) => Connection -> Maybe Result -> m Result Source #
Check the result, if any, and the connection for errors.
Since: 0.0.0