startTransaction()
Last updated 16/09/2024
Example
The following code is starting a transaction on an external database and assigns the result to the variable
tx
.
Start transaction on the MemebersDB database
const db = five.getDatabaseConnectionByID('MembersDB');
if (db.isOk() === false) {
return five.createError(db);
}
const tx = five.startTransaction(db);
if (tx.isOk() === false) {
return five.createError(tx);
}