Transactions actions
List of JSON DB API actions for running database transactions
This section lists the JSON actions that manage transactions in a FairCom database. You can use these actions to create, list, commit, and rollback transactions. You can also create a savepoint within a transaction, and revert back to the savepoint. These actions work for all FairCom products that include the FairCom database engine.
A transaction allows multiple actions to be committed or rolled back as a group. FairCom transactions are ACID compliant: they support atomicity, consistency, durability, and isolation.
Atomicity ensures changes made by actions in a transaction are committed or rolled back all-or-nothing. Durability ensures changes made by actions in a transaction are safely persisted in storage after the transaction has been committed. Isolation ensures changes made by actions inside a transaction are invisible outside it. Isolation prevents queries from seeing uncommitted changes, including inserts, updates, and deletes by other transactions.
Limitations of using SQL actions inside a JSON DB transaction
Once you run a "getRecordsUsingSQL"
or "runSqlStatements"
action within a transaction, it invalidates that transaction's previously created save points; thus, you cannot run the "revertTransactionToSavepoint"
action to revert to a previously created save point.
You can, however, run "createTransactionSavePoint"
after a "getRecordsUsingSQL"
or "runSqlStatements"
action to create a new savepoint, and you can later revert to that savepoint.
Action | Description |
---|---|
returns a | |
bookmarks the current point in the transaction process. You can create multiple savepoints and use | |
reverts a transaction back to a savepoint previously created by | |
closes a transaction and makes its changes durable and visible to other transactions. You can include the | |
closes a transaction and discards all changes made under the control of the transaction. Once a transaction is closed, you can no longer use its | |
returns a list of all active transactions that the logged-in account is authorized to see. |