stakhanov 0.1.1.0 → 0.1.1.1
raw patch · 3 files changed
+19/−2 lines, 3 filesdep +pqi-ffidep ~hasql
Dependencies added: pqi-ffi
Dependency ranges changed: hasql
Files
- CHANGELOG.md +4/−0
- src/Database/PostgreSQL/Stakhanov/Connection.hs +12/−0
- stakhanov.cabal +3/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for stakhanov +## 0.1.1.1 -- 2026-08-13++* Updated to use Hasql >= 2.0 && < 2.1.+ ## 0.1.1.0 -- 2026-06-21 * Add FIFO Queues API
src/Database/PostgreSQL/Stakhanov/Connection.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | This module is just here for a quick start with Stakhanov and Hasql, otherwise use the module [Hasql.Connection](https://hackage.haskell.org/package/hasql/docs/Hasql-Connection.html) and its subsequent modules to create full-blown Hasql connections. @@ -7,12 +8,23 @@ import Hasql.Connection import Hasql.Connection.Settings (connectionString) import Hasql.Errors+#if MIN_VERSION_hasql(2,0,0)+import Pqi.Ffi+#endif -- | Get a local PostgreSQL connection to a Docker container of PGMQ, with the default PostgreSQL connection string "__postgres:\/\/postgres:postgres@0.0.0.0:5432/postgres__". acquireLocalPGConn :: IO (Either ConnectionError Connection)+#if MIN_VERSION_hasql(2,0,0)+acquireLocalPGConn = acquire adapter $ connectionString "postgres://postgres:postgres@0.0.0.0:5432/postgres"+#else acquireLocalPGConn = acquire $ connectionString "postgres://postgres:postgres@0.0.0.0:5432/postgres"+#endif -- | Get a PostgreSQL connection configured with the given PostgreSQL connection string. acquirePGConn :: T.Text -> IO (Either ConnectionError Connection)+#if MIN_VERSION_hasql(2,0,0)+acquirePGConn t = acquire adapter $ connectionString t+#else acquirePGConn t = acquire $ connectionString t+#endif
stakhanov.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: stakhanov-version: 0.1.1.0+version: 0.1.1.1 synopsis: A Haskell PGMQ client description: A fast Haskell PGMQ client for busy workers homepage: https://github.com/MichelBoucey/stakhanov@@ -47,9 +47,10 @@ , aeson >=2.2.3 && <2.4 , base >=4.8 && <5 , contravariant-extras >=0.3.5 && <0.3.6- , hasql >=1.10 && <1.11+ , hasql >=1.10 && <2.1 , hasql-dynamic-statements >=0.5 && <0.6 , hasql-th >=0.5 && <0.6+ , pqi-ffi >=1.0 && <1.1 , text >=1.2.3 && <2.2 , time >=1.9.3 && <1.17 , vector >=0.12.2 && <0.14