Class: PgTransaction

reactive-pg-client-js/pg_transaction~ PgTransaction

new PgTransaction()

A transaction that allows to control the transaction and receive events.
Source:

Methods

abortHandler(handler) → {PgTransaction}

Set an handler to be called when the transaction is aborted.
Parameters:
Name Type Description
handler function the handler
Source:
Returns:
Type
PgTransaction

commit(handler)

Like PgTransaction#commit with an handler to be notified when the transaction commit has completed
Parameters:
Name Type Description
handler function
Source:

prepare(sql, handler) → {PgTransaction}

Create a prepared query.
Parameters:
Name Type Description
sql string the sql
handler function the handler notified with the prepared query asynchronously
Source:
Returns:
Type
PgTransaction

preparedBatch(sql, batch, handler) → {PgTransaction}

Parameters:
Name Type Description
sql string
batch Array.<Tuple>
handler function
Source:
Returns:
Type
PgTransaction

preparedQuery(sql, arguments, handler) → {PgTransaction}

Parameters:
Name Type Description
sql string
arguments Tuple
handler function
Source:
Returns:
Type
PgTransaction

query(sql, handler) → {PgTransaction}

Parameters:
Name Type Description
sql string
handler function
Source:
Returns:
Type
PgTransaction

rollback(handler)

Like PgTransaction#rollback with an handler to be notified when the transaction rollback has completed
Parameters:
Name Type Description
handler function
Source: