MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / writeRows

Function writeRows

__tests__/wal-deferral.test.ts:35–40  ·  view source on GitHub ↗

Grow the WAL: with autocheckpoint off, every commit appends and nothing folds back.

(db: DatabaseConnection, rows: number)

Source from the content-addressed store, hash-verified

33
34/** Grow the WAL: with autocheckpoint off, every commit appends and nothing folds back. */
35function writeRows(db: DatabaseConnection, rows: number): void {
36 const raw = db.getDb();
37 raw.exec('CREATE TABLE IF NOT EXISTS t (id INTEGER PRIMARY KEY, blob TEXT)');
38 const stmt = raw.prepare('INSERT INTO t (blob) VALUES (?)');
39 for (let i = 0; i < rows; i++) stmt.run('x'.repeat(4096));
40}
41
42describe('resolveWalValveMb', () => {
43 it('honors a positive numeric override and falls back otherwise', () => {

Callers 1

Calls 4

getDbMethod · 0.80
execMethod · 0.65
prepareMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected