pg-store-0.0.1: Dead simple storage interface to PostgreSQL

Copyright(c) Ole Krüger 2015-2016
LicenseBSD3
MaintainerOle Krüger <ole@vprsm.de>
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Store.Result

Contents

Description

 

Synopsis

data ResultError Source

Error that occured during result processing

type ColumnInfo = (Column, Oid, Format) Source

Column information

columnNumber :: ByteString -> ResultProcessor Column Source

Get the column number for a column name.

columnType :: Column -> ResultProcessor Oid Source

Get the type of a column.

columnFormat :: Column -> ResultProcessor Format Source

Get the format of a column.

columnInfo :: ByteString -> ResultProcessor ColumnInfo Source

Get information about a column.

foreachRow :: (Row -> ResultProcessor a) -> ResultProcessor [a] Source

Do something for each row.

unpackCellValue :: Column a => Row -> ColumnInfo -> ResultProcessor a Source

Unpack cell value.

Result

class Result a where Source

Result row

Methods

resultProcessor :: ResultProcessor [a] Source

Extract rows from the given result.

Instances

Result () Source 
Result RawRow Source 
Table a => Result (Reference a) Source 
Table a => Result (Row a) Source 
(Result a, Result b) => Result (a, b) Source 
(Result a, Result b, Result c) => Result (a, b, c) Source 
(Result a, Result b, Result c, Result d) => Result (a, b, c, d) Source 
(Result a, Result b, Result c, Result d, Result e) => Result (a, b, c, d, e) Source 
(Result a, Result b, Result c, Result d, Result e, Result f) => Result (a, b, c, d, e, f) Source 
(Result a, Result b, Result c, Result d, Result e, Result f, Result g) => Result (a, b, c, d, e, f, g) Source 

newtype RawRow Source

A row containing all a list of all column values.

Constructors

RawRow [Value]