Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DecodeResult result
- ignore :: DecodeResult ()
- length :: DecodeResult Int
- head :: DecodeRow row -> DecodeResult row
- headIfExists :: DecodeRow row -> DecodeResult (Maybe row)
- vector :: DecodeRow row -> DecodeResult (Vector row)
- list :: DecodeRow row -> DecodeResult [row]
- revList :: DecodeRow row -> DecodeResult [row]
- hashMap :: (Eq key, Hashable key) => DecodeRow (key, value) -> DecodeResult (HashMap key value)
- foldRows :: Fold row result -> DecodeRow row -> DecodeResult (result, Int)
- foldMRows :: FoldM IO row result -> DecodeRow row -> DecodeResult (result, Int)
Documentation
data DecodeResult result Source #
ignore :: DecodeResult () Source #
Ignore the result.
length :: DecodeResult Int Source #
The amount of rows affected by the statement. All statements produce this result.
head :: DecodeRow row -> DecodeResult row Source #
First row of a non-empty result. Raises a connection error if there's no rows.
headIfExists :: DecodeRow row -> DecodeResult (Maybe row) Source #
First row of a possibly empty result set.
revList :: DecodeRow row -> DecodeResult [row] Source #
List of rows in a reverse order. Faster than list
.
hashMap :: (Eq key, Hashable key) => DecodeRow (key, value) -> DecodeResult (HashMap key value) Source #
Rows folded into a map.
foldRows :: Fold row result -> DecodeRow row -> DecodeResult (result, Int) Source #
Essentially, a specification of Map/Reduce over all the rows of the result set. Can be used to produce all kinds of containers or to implement aggregation algorithms on the client side.
Besides the result of folding it returns the amount of affected rows, since it's provided by the database either way.
foldMRows :: FoldM IO row result -> DecodeRow row -> DecodeResult (result, Int) Source #
Essentially, a specification of Map/Reduce over all the rows of the result set. Can be used to produce all kinds of containers or to implement aggregation algorithms on the client side.
Besides the result of folding it returns the amount of affected rows, since it's provided by the database either way.