postgresIsTransacting function

Return whether a transaction is ongoing

Return whether a transaction is ongoing

Detect whether the transaction is active for the given connection. A transaction might be started with DBI::dbBegin() or wrapped within DBI::dbWithTransaction().

postgresIsTransacting(conn)

Arguments

  • conn: a PqConnection object, produced by DBI::dbConnect()

Returns

A boolean, indicating if a transaction is ongoing.

  • Maintainer: Kirill Müller
  • License: MIT + file LICENSE
  • Last published: 2025-02-25