SIGN IN SIGN UP

feat: add new client.getTransactionStatus() method (#3645)

* feat: add new client.getTransactionStatus() method

Adds a new public method to retrieve the current transaction status
of the client connection. Returns 'I' (idle), 'T' (in transaction),
'E' (error/aborted), or null (initial state/native client).

The transaction status is tracked from PostgreSQL's ReadyForQuery
message after each query completes.

Native client returns null as it does not support this feature yet.

* feat: add native client support for getTransactionStatus()

- Add getTransactionStatus() to pg-native using libpq's
  PQtransactionStatus() with status mapping (0->I, 2->T, 3->E)
- Update pg native client wrapper to delegate to pg-native
- Remove native guard from txstatus tests (now runs in both modes)
- Bump libpq to ^1.10.0 for transactionStatus() binding support

* docs

* Tests

* fix: docs

* clear docs

---------

Co-authored-by: Brian C <brian.m.carlson@gmail.com>
L
Leonardo Zanivan committed
939725e02c392a6f863cd57970aa3202fb500912
Parent: effc3f6
Committed by GitHub <noreply@github.com> on 5/11/2026, 7:55:10 PM