| Copyright | (c) Ole Krüger 2015-2016 |
|---|---|
| License | BSD3 |
| Maintainer | Ole Krüger <ole@vprsm.de> |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.PostgreSQL.Store.Result
Contents
Description
- data ResultError
- data ResultProcessor a
- processResult :: Result -> ResultProcessor a -> ExceptT ResultError IO [a]
- processOneResult :: Result -> ResultProcessor a -> ExceptT ResultError IO (Maybe a)
- skipColumn :: ResultProcessor ()
- unpackColumn :: Column a => ResultProcessor a
Result processor
data ResultError Source #
Error that occured during result processing
Constructors
| TooFewColumnsError Column | Occurs when you're trying to access a column that does not exist. |
| UnpackError Row Column Oid Format | The value at a given row and column could not be unpacked. |
Instances
data ResultProcessor a Source #
Result processor
processResult :: Result -> ResultProcessor a -> ExceptT ResultError IO [a] Source #
Process the entire result set.
processOneResult :: Result -> ResultProcessor a -> ExceptT ResultError IO (Maybe a) Source #
Process one row of the result set.
skipColumn :: ResultProcessor () Source #
Move cursor to the next column.
unpackColumn :: Column a => ResultProcessor a Source #
Unpack the current column and move the cursor to the next column.