psql-0.0.0: PostgreSQL client
Safe HaskellNone
LanguageHaskell2010

PostgreSQL.Result

Description

This module is dedicated to dealing with query results.

Synopsis

Documentation

data Result a Source #

Query result

Since: 0.0.0

Instances

Instances details
Functor Result Source #

Since: 0.0.0

Instance details

Defined in PostgreSQL.Result

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

runResultPq :: MonadIO m => Result -> Result a -> m (Either Errors a) Source #

Process libpq's Result.

Since: 0.0.0

Combinators

ignored :: Result () Source #

Ignore the result set.

Since: 0.0.0

single :: Row a -> Result a Source #

Process exactly 1 row.

Since: 0.0.0

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

many :: Row a -> Result (Vector a) Source #

Process 0 or more rows.

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