MCPcopy
hub / github.com/sequelize/sequelize / trans4

Function trans4

types/test/transaction.ts:47–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47async function trans4() {
48 return await sequelize.transaction(async transaction => {
49 transaction.afterCommit(() => console.log('transaction complete'));
50 User.findAll(
51 {
52 transaction,
53 lock: {
54 level: transaction.LOCK.UPDATE,
55 of: User,
56 },
57 }
58 );
59 return 1;
60 });
61}
62
63async function transact() {
64 const t = await sequelize.transaction({

Callers

nothing calls this directly

Calls 4

transactionMethod · 0.80
afterCommitMethod · 0.80
logMethod · 0.80
findAllMethod · 0.80

Tested by

no test coverage detected