From b2e83c4bcbf818b4cc901d355f4f50e1e1a284a3 Mon Sep 17 00:00:00 2001 From: Laurent Rene de Cotret Date: Tue, 9 Jul 2024 13:37:06 -0400 Subject: [PATCH] Make it easier to find how to execute Pg actions (#663) --- beam-postgres/ChangeLog.md | 4 ++++ beam-postgres/Database/Beam/Postgres.hs | 5 +++-- beam-postgres/Database/Beam/Postgres/Connection.hs | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/beam-postgres/ChangeLog.md b/beam-postgres/ChangeLog.md index e86fb6908..d53bd0216 100644 --- a/beam-postgres/ChangeLog.md +++ b/beam-postgres/ChangeLog.md @@ -4,6 +4,10 @@ * Better error messages on column type mismatches (#696). +## Documentation + + * Make `runBeamPostgres` and `runBeamPostgresDebug` easier to find (#663). + # 0.5.3.1 ## Added features diff --git a/beam-postgres/Database/Beam/Postgres.hs b/beam-postgres/Database/Beam/Postgres.hs index 8dd4aa5c3..e6d87369e 100644 --- a/beam-postgres/Database/Beam/Postgres.hs +++ b/beam-postgres/Database/Beam/Postgres.hs @@ -21,6 +21,9 @@ module Database.Beam.Postgres ( -- * Beam Postgres backend Postgres(..), Pg, liftIOWithHandle + -- ** Executing actions against the backend + , runBeamPostgres, runBeamPostgresDebug + -- ** Postgres syntax , PgCommandSyntax, PgSyntax , PgSelectSyntax, PgInsertSyntax @@ -41,8 +44,6 @@ module Database.Beam.Postgres , module Database.Beam.Postgres.PgSpecific - , runBeamPostgres, runBeamPostgresDebug - -- ** Postgres extension support , PgExtensionEntity, IsPgExtension(..) , pgCreateExtension, pgDropExtension diff --git a/beam-postgres/Database/Beam/Postgres/Connection.hs b/beam-postgres/Database/Beam/Postgres/Connection.hs index fe700e70f..deb0fa4b2 100644 --- a/beam-postgres/Database/Beam/Postgres/Connection.hs +++ b/beam-postgres/Database/Beam/Postgres/Connection.hs @@ -309,6 +309,8 @@ data FetchMode -- @beam-postgres@ also provides functions that let you run queries without -- 'MonadBeam'. These functions may be more efficient and offer a conduit -- API. See "Database.Beam.Postgres.Conduit" for more information. +-- +-- You can execute 'Pg' actions using 'runBeamPostgres' or 'runBeamPostgresDebug'. newtype Pg a = Pg { runPg :: F PgF a } deriving (Monad, Applicative, Functor, MonadFree PgF)