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

Method runInTransaction

src/db/queries.ts:884–886  ·  view source on GitHub ↗

* Run `fn` as one transaction. The write helpers called inside join it * rather than committing on their own, so a crash part-way leaves none of * `fn`'s writes behind.

(fn: () => T)

Source from the content-addressed store, hash-verified

882 * `fn`'s writes behind.
883 */
884 runInTransaction<T>(fn: () => T): T {
885 return this.db.transaction(fn)();
886 }
887
888 /**
889 * Store one file's whole extraction bundle — nodes, edges, unresolved refs,

Callers 1

storeExtractionResultMethod · 0.80

Calls 1

transactionMethod · 0.65

Tested by

no test coverage detected