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

Function query

__tests__/php-legacy-string-offsets.test.ts:68–71  ·  view source on GitHub ↗
(sql: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

66});
67
68function query<T>(sql: string, ...args: unknown[]): T[] {
69 const db = (cg as unknown as { db: { getDb(): { prepare(sql: string): { all(...a: unknown[]): T[] } } } }).db;
70 return db.getDb().prepare(sql).all(...args);
71}
72
73describe('PHP legacy brace string offsets (#3299)', () => {
74 it("keeps the function around `$code{0}` and gives it its own calls (the issue's repro)", () => {

Calls 3

getDbMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected