public function inTransaction(): bool
    {
        $status = pg_transaction_status($this->getResource());

        return PGSQL_TRANSACTION_INTRANS === $status || PGSQL_TRANSACTION_INERROR === $status;
    }
public function inTransaction(): bool
    {
        $status = pg_transaction_status($this->getResource());

        return PGSQL_TRANSACTION_INTRANS === $status || PGSQL_TRANSACTION_INERROR === $status;
    }
public function inTransaction ( ) : bool { $ status = pg_transaction_status ( $ this -> getResource ( ) ) ; return PGSQL_TRANSACTION_INTRANS === $ status || PGSQL_TRANSACTION_INERROR === $ status ; }
Checks whether a transaction is currently open.

@return  bool
Checks whether a transaction is currently open .