transaction


Purpose

Opens a database in read/write mode, i.e. it allows both read and write SQL statements to run on the database. A transaction is a set of operations considered as one single operation. If a transaction fails, the updates to the database are not committed. Note that this method will lock the entire database.

Signature

transaction(callback, errorCallback, successCallback)

Returns

This method does not return anything.

Parameter

Name Description Type
callback The transaction callback invoked with the SQLTransaction object that represents the transaction. The transaction callback executes the query. SQLTransactionCallback
errorCallback An optional callback object containing a method to handle transaction errors. SQLTransactionErrorCallback
successCallback An optional callback object containing a method to be executed when the transaction succeeds. SQLVoidCallback

Related topics

SQLStorage.Database
Overview
Web SQL Database
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...