hdbi-postgresql-1.0.0: PostgreSQL driver for hdbi

Portabilityportable
Stabilityexperimental
MaintainerAleksey Uymanov <s9gf4ult@gmail.com>
Safe HaskellNone

Database.HDBI.PostgreSQL

Description

HDBI driver interface for PostgreSQL 8.x and above

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

data PostgreConnection Source

Constructors

PostgreConnection 

Fields

postNative :: MVar (Maybe Connection)

LibPQ connection if established

postStatements :: ChildList PostgreStatement

List of weak refs to statements to finalize on disconnect

postConnString :: Text

Original connection string

data PostgreStatement Source

Constructors

PostgreStatement 

Fields

stQuery :: Query

Initial query

stConnection :: PostgreConnection

Connection this statement working with

stState :: MVar PGStatementState

State of statement

data PGStatementState Source

Constructors

STNew

Newly created or reseted statement

STExecuted

Just executed statement

Fields

pgstResult :: !Result

The result to fetch data from

STFetching

Fetching rows is in progress

Fields

pgstResult :: !Result

The result to fetch data from

pgstColumns :: !Column

Columns count

pgstFormats :: ![Format]
 
pgstTypes :: ![Oid]
 
pgstTuples :: !Row

Tuples in result

pgstCurrent :: !Row

Row number waiting to fetch

STFinished

Statement is finished, can still be reseted

connectPostgreSQLSource

Arguments

:: Text

Connection string according to the documentation

-> IO PostgreConnection 

Establish new PostgreSQL connection