Class: Transaction

vertx-sql-client-js/transaction~ Transaction

new Transaction()

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

Methods

abortHandler(handler) → {Transaction}

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

close()

Rollback the transaction and release the associated resources.
Source:

commit(handler)

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

prepare(sql, handler) → {Transaction}

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
Transaction

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

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

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

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

query(sql, handler) → {Transaction}

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

rollback(handler)

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