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

Method getChangeStamp

src/db/queries.ts:1435–1443  ·  view source on GitHub ↗

* A value that differs whenever the database content may have changed * since the last call, whoever changed it: `total_changes()` counts the * rows this connection inserted, updated or deleted, and * `PRAGMA data_version` moves when any OTHER connection — another process's * sync, a CLI

()

Source from the content-addressed store, hash-verified

1433 * recompute, which only costs time, never a stale answer.
1434 */
1435 private getChangeStamp(): string {
1436 if (!this.stmts.getChangeStamp) {
1437 this.stmts.getChangeStamp = this.db.prepare(
1438 'SELECT total_changes() AS changes, (SELECT data_version FROM pragma_data_version) AS version'
1439 );
1440 }
1441 const row = this.stmts.getChangeStamp.get() as { changes: number; version: number };
1442 return `${row.changes}:${row.version}`;
1443 }
1444
1445 private computeDominantFile(): { filePath: string; edgeCount: number; nextEdgeCount: number } | null {
1446 if (!this.stmts.getDominantFile) {

Callers 2

memoizedReadMethod · 0.95
getDominantFileMethod · 0.95

Calls 2

prepareMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected