-
Notifications
You must be signed in to change notification settings - Fork 16
Examples Transactions
Michael Anderson edited this page Dec 12, 2017
·
3 revisions
Database-js supports transactions if the underlying driver supports them. The transaction code on the API has been written to be backwards compatible with existing drivers. The followng have been added to the API:
Returns a boolean value, true if transactions are supported by the driver, false if they are not.
Returns a boolean value, true if the connection is currently in a transaction state, false if it is not or if the driver does not support transactions.
Returns a Promise. Resolves to true if a transaction was started.
Returns a Promise. Resolves to true if a active transaction was committed.
Returns a Promise. Resolves to true if a transaction was rolled back.