diff --git a/bluefin-opaleye/CHANGELOG.md b/bluefin-opaleye/CHANGELOG.md index 25a2bec..cc897b6 100644 --- a/bluefin-opaleye/CHANGELOG.md +++ b/bluefin-opaleye/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Haskell Package Versioning Policy](https://pvp.hask ## [Unreleased] +## [0.2.0.0] - 22.09.2026 + ### Changed - Support `bluefin` versions `0.2.7 && < 0.6` in [#4](https://github.com/fpringle/bluefin-postgresql/pull/4). - Extract common operation counting code to [postgresql-operation-counting](https://github.com/fpringle/postgresql-operation-counting) in [#6](https://github.com/fpringle/bluefin-postgresql/pull/6). Breaking change. @@ -22,5 +24,6 @@ and this project adheres to [Haskell Package Versioning Policy](https://pvp.hask - Reasonably detailed READMEs. - CI that builds and tests the packages for each version of GHC in the `tested-with` field. -[unreleased]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-opaleye-0.1.0.0...HEAD +[unreleased]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-opaleye-0.2.0.0...HEAD +[0.2.0.0]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-opaleye-0.1.0.0...bluefin-opaleye-0.2.0.0 [0.1.0.0]: https://github.com/fpringle/bluefin-postgresql/releases/tag/bluefin-opaleye-0.1.0.0 diff --git a/bluefin-opaleye/bluefin-opaleye.cabal b/bluefin-opaleye/bluefin-opaleye.cabal index 9708f00..80e9ed7 100644 --- a/bluefin-opaleye/bluefin-opaleye.cabal +++ b/bluefin-opaleye/bluefin-opaleye.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: bluefin-opaleye -version: 0.1.0.0 +version: 0.2.0.0 synopsis: bluefin support for high-level PostgreSQL operations via Opaleye. description: @@ -27,7 +27,7 @@ tested-with: , GHC == 9.10.2 common warnings - ghc-options: -Wall -Wno-unused-do-bind -Wunused-packages -Werror + ghc-options: -Wall -Wno-unused-do-bind -Wunused-packages common deps build-depends: @@ -35,7 +35,7 @@ common deps , bluefin >= 0.2.7 && < 0.11 , opaleye >= 0.9 && < 0.11 , product-profunctors >= 0.9 && < 0.12 - , bluefin-postgresql >= 0.1 && < 0.2 + , bluefin-postgresql >= 0.1 && < 0.3 , postgresql-simple >= 0.7 && < 0.8 , text >= 2.0 && < 2.2 , containers >= 0.6 && < 0.8 diff --git a/bluefin-postgresql/CHANGELOG.md b/bluefin-postgresql/CHANGELOG.md index d960a80..955ae12 100644 --- a/bluefin-postgresql/CHANGELOG.md +++ b/bluefin-postgresql/CHANGELOG.md @@ -7,11 +7,16 @@ and this project adheres to [Haskell Package Versioning Policy](https://pvp.hask ## [Unreleased] +## [0.2.0.0] - 22.09.2026 + ### Changed - Support `bluefin` versions `0.2.7 && < 0.6` in [#4](https://github.com/fpringle/bluefin-postgresql/pull/4). -- Dynamic `PostgreSQL` effect in [#7](https://github.com/fpringle/bluefin-postgresql/pull/7). - Support `bluefin < 0.11` in [#8](https://github.com/fpringle/bluefin-postgresql/pull/8). + +### Added + +- Dynamic `PostgreSQL` effect in [#7](https://github.com/fpringle/bluefin-postgresql/pull/7). - Support OpenTelemetry instrumentation in [#11](https://github.com/fpringle/bluefin-postgresql/pull/11). ## [0.1.0.0] - 27.02.2026 @@ -23,5 +28,6 @@ and this project adheres to [Haskell Package Versioning Policy](https://pvp.hask - Reasonably detailed READMEs. - CI that builds and tests the packages for each version of GHC in the `tested-with` field. -[unreleased]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-postgresql-0.1.0.0...HEAD +[unreleased]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-postgresql-0.2.0.0...HEAD +[0.2.0.0]: https://github.com/fpringle/bluefin-postgresql/compare/bluefin-postgresql-0.1.0.0...bluefin-postgresql-0.2.0.0 [0.1.0.0]: https://github.com/fpringle/bluefin-postgresql/releases/tag/bluefin-postgresql-0.1.0.0 diff --git a/bluefin-postgresql/bluefin-postgresql.cabal b/bluefin-postgresql/bluefin-postgresql.cabal index 5a78f92..26479a1 100644 --- a/bluefin-postgresql/bluefin-postgresql.cabal +++ b/bluefin-postgresql/bluefin-postgresql.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: bluefin-postgresql -version: 0.1.0.0 +version: 0.2.0.0 synopsis: bluefin support for mid-level PostgreSQL operations. description: diff --git a/bluefin-postgresql/src/Bluefin/PostgreSQL/Effect.hs b/bluefin-postgresql/src/Bluefin/PostgreSQL/Effect.hs index aac56c8..1f61e53 100644 --- a/bluefin-postgresql/src/Bluefin/PostgreSQL/Effect.hs +++ b/bluefin-postgresql/src/Bluefin/PostgreSQL/Effect.hs @@ -828,6 +828,13 @@ runPostgreSQL withConn ioe k = returningWithImpl parser q rows = withConnection withConn $ \conn -> effIO ioe $ PSQL.returningWith parser conn q rows #if OTEL +{- | An interpreter for the 'PostgreSQL' effect that runs database operations using OpenTelemetry instrumentation. + +Basically the same as 'runPostgreSQL' except it uses the functions from +[OpenTelemetry.Instrumentation.PostgresqlSimple](https://hackage-content.haskell.org/package/hs-opentelemetry-instrumentation-postgresql-simple/docs/OpenTelemetry-Instrumentation-PostgresqlSimple.html). + +Note that the @enable-opentel@ cabal flag must be set to enable this functionality. +-} runPostgreSQLOT :: forall e1 e2 es b. (HasCallStack, e1 :> es, e2 :> es) =>