hasql-streams-core-0.1.0.0: Stream Hasql queries
Safe HaskellNone
LanguageHaskell2010

Hasql.Streams

Synopsis

Documentation

type CursorStreamFold s a r = forall x. (x -> CursorTransactionIO s (Maybe (a, x))) -> CursorTransactionIO s x -> r Source #

A fold over a stream of a values to produce an r using CursorTransactionIO s

cursorStreamQuery :: forall params s a r. Statement params [a] -> params -> CursorStreamFold s a r -> r Source #

Run a Statement using a cursor inside a CursorTransactionIO to produce a stream of as, which are consumed by a CursorStreamFold. This function can produce any type of stream without depending on any particular stream library.