pgstream-0.1.0.3: Elsen Accelerated Computing Engine

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Stream

Contents

Synopsis

SQL query ( result set )

query :: (FromRow r, ToSQL q) => Connection -> Query -> q -> IO [r] Source

SQL query ( no result )

SQL query ( cursor )

stream Source

Arguments

:: (FromRow r, ToSQL a, MonadBaseControl IO m, MonadIO m) 
=> Connection

Connection

-> Query

Query

-> a

Query arguments

-> Int

Batch size

-> Source m [r]

Source conduit

stream_ Source

Arguments

:: (FromRow r, MonadBaseControl IO m, MonadIO m) 
=> Connection

Connection

-> Query

Query

-> Int

Batch size

-> Source m [r]

Source conduit

Transacations

commit :: Connection -> IO () Source

Commit a transaction.

rollback :: Connection -> IO () Source

Rollback a transaction.

Database pool

data PoolSettings Source

Constructors

PoolSettings 

Fields

_stripes :: Int

Stripe count. The number of distinct sub-pools to maintain. The smallest acceptable value is 1.

_keepalive :: NominalDiffTime

Amount of time for which an unused resource is kept open. The smallest acceptable value is 0.5 seconds.

_affinity :: Int

Maximum number of resources to keep open per stripe. The smallest acceptable value is 1.

LibPQ Rexports

data Connection :: *

Connection encapsulates a connection to the backend.

Instances

data ExecStatus :: *

Constructors

EmptyQuery

The string sent to the server was empty.

CommandOk

Successful completion of a command returning no data.

TuplesOk

Successful completion of a command returning data (such as a SELECT or SHOW).

CopyOut

Copy Out (from server) data transfer started.

CopyIn

Copy In (to server) data transfer started.

BadResponse

The server's response was not understood.

NonfatalError

A nonfatal error (a notice or warning) occurred.

FatalError

A fatal error occurred.

data ConnStatus :: *

Constructors

ConnectionOk

The Connection is ready.

ConnectionBad

The connection procedure has failed.

ConnectionStarted

Waiting for connection to be made.

ConnectionMade

Connection OK; waiting to send.

ConnectionAwaitingResponse

Waiting for a response from the server.

ConnectionAuthOk

Received authentication; waiting for backend start-up to finish.

ConnectionSetEnv

Negotiating environment-driven parameter settings.

ConnectionSSLStartup

Negotiating SSL encryption.

Connection initialization

SQL quasiquoter

SQL formatting

fmtSQL :: ToSQL a => Query -> a -> SQL Source