packages feed

pgmq-hasql 0.3.0.0 → 0.4.0.0

raw patch · 3 files changed

+21/−7 lines, 3 filesdep +pg-migratedep ~pgmq-corePVP ok

version bump matches the API change (PVP)

Dependencies added: pg-migrate

Dependency ranges changed: pgmq-core

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # Revision history for pgmq-hasql +## 0.4.0.0 -- 2026-07-14++* Version bump only — coordinated release with pgmq-migration 0.4.0.0.+  No library source changes since 0.3.0.0; the test suite was updated for the+  native `pgmq-migration` API.+* Bumped `pgmq-core` dependency bound to `>=0.4 && <0.5`.+ ## 0.3.0.0 -- 2026-05-31  * Version bump only — coordinated release with pgmq-effectful 0.3.0.0.
pgmq-hasql.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.4 name:            pgmq-hasql-version:         0.3.0.0+version:         0.4.0.0 synopsis:        Hasql-based client for PGMQ (PostgreSQL Message Queue) description:   A Haskell client library for PGMQ (PostgreSQL Message Queue) built@@ -57,7 +57,7 @@     , hasql              ^>=1.10     , hasql-transaction  ^>=1.2     , lens               ^>=5.3-    , pgmq-core          >=0.3   && <0.4+    , pgmq-core          >=0.4   && <0.5     , template-haskell   >=2.20  && <3     , text               ^>=2.1     , time               ^>=1.14@@ -98,6 +98,7 @@     , hasql     , hasql-pool      ^>=1.4     , hedgehog        ^>=1.5+    , pg-migrate     , pgmq-core     , pgmq-hasql     , pgmq-migration
test/EphemeralDb.hs view
@@ -15,8 +15,14 @@   ) where +import Data.List.NonEmpty (NonEmpty (..)) import Data.Text qualified as T import Data.Word (Word32)+import Database.PostgreSQL.Migrate+  ( defaultRunOptions,+    migrationPlan,+    runMigrationPlan,+  ) import EphemeralPg   ( StartError,     connectionSettings,@@ -38,12 +44,12 @@             PoolConfig.staticConnectionSettings connSettings           ]   pool <- Pool.acquire poolConfig-  -- Install pgmq schema-  installResult <- Pool.use pool Migration.migrate+  component <- either (error . ("Invalid PGMQ migration component: " <>) . show) pure Migration.pgmqMigrations+  plan <- either (error . ("Invalid PGMQ migration plan: " <>) . show) pure (migrationPlan (component :| []))+  installResult <- runMigrationPlan defaultRunOptions connSettings plan   case installResult of-    Left poolErr -> error $ "Failed to install pgmq schema: " <> show poolErr-    Right (Left migrationErr) -> error $ "Migration failed: " <> show migrationErr-    Right (Right ()) -> action pool+    Left migrationErr -> error $ "Migration failed: " <> show migrationErr+    Right _ -> action pool  -- | Run an action with a connection pool to a temporary PostgreSQL database -- The database will have the pgmq schema installed