The transaction shorthand object.
An operation such as
await tx.$.myStore.add(myitem)
Will add an item to the database store called myStore
.
Also see Example.
See Versioning.
The object stores that the transaction has access to.
For non-programmatic code, Transaction.$ is nicer to use.
Transaction mode
Current transaction state.
active
- In progress.
committed
- Successfully complete.
aborted
- Unsuccessful.
Abort the transaction, cancelling all staged changes.
Add a store to the database.
Only possible a migration; see Versioning.
Commit a transaction, applying all staged changes to the database.
Remove a store from the index.
Only possible in a migration; see Versioning.
Run some code with the transaction.
If the code successfully completes, commit the transaction.
If the code calls .abort()
or throws an exception, abort the transaction.
Like Transaction.wrap but synchronous.
Generated using TypeDoc
A database transaction.
Transactions are groups of related database operations, such as adding, removing, and qurying data. Transactions are atomic: if an error occurs during a transaction, all operations will be cancelled.