MCPcopy Index your code
hub / github.com/github/copilot-sdk / getOrCreateDb

Function getOrCreateDb

nodejs/test/e2e/session_fs_sqlite.e2e.test.ts:146–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 const sp = (path: string) => `/${session.sessionId}${path.startsWith("/") ? path : "/" + path}`;
145
146 function getOrCreateDb(): DatabaseSync {
147 let db = sessionDbs.get(session.sessionId);
148 if (!db) {
149 db = new DatabaseSync(":memory:");
150 db.exec("PRAGMA busy_timeout = 5000");
151 sessionDbs.set(session.sessionId, db);
152 }
153 return db;
154 }
155
156 return {
157 async readFile(path: string): Promise<string> {

Callers 1

queryFunction · 0.85

Calls 3

getMethod · 0.45
execMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…