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

Method batch

__tests__/telemetry-services.test.ts:107–119  ·  view source on GitHub ↗
(statements: SqliteD1Statement[])

Source from the content-addressed store, hash-verified

105 }
106
107 async batch(statements: SqliteD1Statement[]): Promise<ReturnType<SqliteD1Statement['execute']>[]> {
108 this.batches++;
109 this.onBatch?.(statements);
110 this.db.exec('BEGIN');
111 try {
112 const results = statements.map((s) => s.execute());
113 this.db.exec('COMMIT');
114 return results;
115 } catch (err) {
116 this.db.exec('ROLLBACK');
117 throw err;
118 }
119 }
120}
121
122// ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

mapMethod · 0.80
execMethod · 0.65
executeMethod · 0.45

Tested by

no test coverage detected