MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

benchmark/sqlite/sqlite-is-transaction.js:11–31  ·  view source on GitHub ↗
(conf)

Source from the content-addressed store, hash-verified

9});
10
11function main(conf) {
12 const db = new sqlite.DatabaseSync(':memory:');
13
14 if (conf.transaction === 'true') {
15 db.exec('BEGIN');
16 }
17
18 let i;
19 let deadCodeElimination = true;
20
21 bench.start();
22 for (i = 0; i < conf.n; i += 1)
23 deadCodeElimination &&= db.isTransaction;
24 bench.end(conf.n);
25
26 assert.ok(deadCodeElimination === (conf.transaction === 'true'));
27
28 if (conf.transaction === 'true') {
29 db.exec('ROLLBACK');
30 }
31}

Callers

nothing calls this directly

Calls 4

execMethod · 0.45
startMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…