hpgsql
Safe HaskellNone
LanguageHaskell2010

Hpgsql.Encoding.RowDecoderMonadic

Synopsis

Documentation

newtype RowDecoderMonadic a Source #

Unlike Hpgsql.Encoding.RowDecoder, this has a Monad instance. You should prefer to use Hpgsql.Encoding.RowDecoder (through FromPgRow instances) instead of this, and use this only if your row decoder is complex enough that decoded fields can change the behaviour of other decoded fields. The regular RowDecoder can even type-check queries that return no results, while this can't. Look for the query and pipeline functions with an M in them for ways to query with this kind of row decoder.

Constructors

RowDecoderMonadic 

Fields

toMonadicRowDecoder :: RowDecoder a -> RowDecoderMonadic a Source #

Takes an Applicative row parser (which can type-check result rows before even fetching any rows from the response) and transforms it into a Monadic row parser, which has no such type-checking.