hasql-cursor-transaction-0.6.3: An abstraction for simultaneous fetching from multiple PostgreSQL cursors

Safe HaskellNone
LanguageHaskell2010

Hasql.CursorTransaction

Contents

Synopsis

Types

data CursorTransaction s result Source #

Context for fetching from multiple cursors in an intertwined fashion.

data Cursor s Source #

Cursor reference.

data BatchSize Source #

Spefifies how many rows to fetch in a single DB roundtrip.

data EncodedParams Source #

A parameters encoder immediately supplied with parameters.

Cursor Transactions

declareCursor :: ByteString -> EncodedParams -> CursorTransaction s (Cursor s) Source #

Given a template and encoded params produces a cursor, while automating its resource management.

fetchBatch :: Cursor s -> BatchSize -> Result result -> CursorTransaction s result Source #

Fetch from a cursor a batch of the given size and decode it using the specified result decoder.

transaction :: Transaction result -> CursorTransaction s result Source #

Lift a standard transaction. Note that the transaction must not execute other CursorTransactions.

Batch Sizes

batchSize_10 :: BatchSize Source #

Batch size of 10.

batchSize_100 :: BatchSize Source #

Batch size of 100.

batchSize_1000 :: BatchSize Source #

Batch size of 1000.

batchSize_10000 :: BatchSize Source #

Batch size of 10000.

Encoded Params

encodedParams :: Params params -> params -> EncodedParams Source #

Pack the params encoder and params into EncodedParams.