MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / record

Function record

apps/host-cloudflare/src/db/d1.test.ts:18–24  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

16 const statements: string[] = [];
17 let failurePredicate: ((sql: string) => boolean) | null = null;
18 const record = (sql: string): void => {
19 statements.push(sql);
20 if (failurePredicate?.(sql)) {
21 // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- test boundary: the fake D1 adapter must reject exactly where the real D1 query would reject
22 throw new Error("forced D1 failure");
23 }
24 };
25 const prepare = (sql: string) => {
26 const statement = (args: readonly unknown[]): Record<string, unknown> => ({
27 bind: (...values: readonly unknown[]) => statement([...args, ...values]),

Callers 1

statementFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected