Stream postgresql-query results using the streaming library
|Latest on Hackage:||0.2.0.1|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
This package provides incremental streaming functions for the
Revision history for streaming-postgresql-simple
Increase upper bound of
0.2.0.0 -- 2017-02-03
Correctly perform finalisation in
The previous implementation would perform the necessary finalisation only if the
stream was drained. Some handling was in-place such that exceptions wouldn't
cause the stream to end prematurely, but this isn't enough. We now use
MonadResource to register an action to drain the stream.
Users should now wrap calls using
>>> runResourceT (S.mapM_ print (query c "SELECT * FROM t"))
Correctly deal with transactions in
stream requires a transaction in order to function. If there isn't a
stream would create one, but if you manually called
rollback from within the stream, the internal state would become
inconsistent. This would lead to confusing error messages.
We now watch the transaction state as we pull items out from the stream, and inform the user if the internal state is not what we expected. Further more, cleanup actions (commit/rolling back the transaction) now only happen if there is still a transaction open.
0.1.0.0 -- 2017-02-02
- First version. Released on an unsuspecting world. Mwahaha.