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

Method rebind

src/db/queries.ts:605–617  ·  view source on GitHub ↗

* Swap the underlying connection in place. Used by pool workers' * connection recycling (plan §7a.6, writes-under-readers): a long-lived * read connection pins WAL checkpoint progress, and the deep WAL that * accumulates behind it taxes every main-thread B-tree page operation * (deletes

(db: SqliteDatabase)

Source from the content-addressed store, hash-verified

603 * lazily on next use.
604 */
605 rebind(db: SqliteDatabase): void {
606 this.db = db;
607 this.stmts = {};
608 this.batchStmts.clear();
609 this.edgeKindStmts.clear();
610 this.flowQueries = undefined;
611 // The change stamp is per connection, and fresh connections to two
612 // different databases report the same one — the memo goes with the old
613 // connection, or a worker following a rebuilt index keeps its answer (#1864).
614 this.dominantFileMemo = undefined;
615 this.readMemos.clear();
616 this.presentSchema.clear();
617 }
618
619 /**
620 * Tables (`name`) and columns (`table.column`) that later migrations added,

Callers 2

resolver-worker.tsFile · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected