static/v2/api/transaction/index.html
View code The transaction object is used to identify a running transaction. It is created by calling Sequelize.transaction().
To run a query under a transaction, you should pass the transaction in the options object.
ISOLATION_LEVELSView code The possible isolations levels to use when starting a transaction
{
READ_UNCOMMITTED: "READ UNCOMMITTED",
READ_COMMITTED: "READ COMMITTED",
REPEATABLE_READ: "REPEATABLE READ",
SERIALIZABLE: "SERIALIZABLE"
}
LOCKView code Possible options for row locking. Used in conjuction with find calls:
t1 // is a transaction
Model.findAll({
where: ...
}, {
transaction: t1,
lock: t1.LOCK.UPDATE,
lock: t1.LOCK.SHARE
})
commit() -> thisView code Commit the transaction
rollback() -> thisView code Rollback (abort) the transaction
This document is automatically generated based on source code comments. Please do not edit it directly, as your changes will be ignored. Please write on IRC, open an issue or a create a pull request if you feel something can be improved. For help on how to write source code documentation see JSDoc and dox