startTransaction()
Last updated 10/05/2023
Example One
This code is starting a transaction using the startTranscation()
on the Five
object and assigning the result to the variable tx
. The isOk()
function is called to check
if the transaction was successful. If the transaction is not successful an error is returned using the createError()
on the Five
object.
Start transaction on the database
const tx = five.startTransaction(db);
if (tx.isOk() === false) {
return five.createError(tx);
}