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

Function get

__tests__/node-rows.test.ts:47–53  ·  view source on GitHub ↗
(target, key)

Source from the content-addressed store, hash-verified

45 const connection = db.getDb();
46 const asObjects = new QueryBuilder(new Proxy(connection, {
47 get(target, key) {
48 if (key !== 'prepare') {
49 const value = Reflect.get(target, key);
50 return typeof value === 'function' ? value.bind(target) : value;
51 }
52 return (sql: string) => ({ ...target.prepare(sql), rowsAsArrays: () => undefined });
53 },
54 }));
55
56 expect(asArrays.getNodeById(full.id)).toEqual(full);

Callers

nothing calls this directly

Calls 3

bindMethod · 0.80
getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected