MCPcopy
hub / github.com/BuilderIO/agent-native / execute

Function execute

packages/core/src/db/client.ts:305–318  ·  view source on GitHub ↗
(sql)

Source from the content-addressed store, hash-verified

303 const d1 = globalThis.__cf_env?.DB;
304 _exec = {
305 async execute(sql) {
306 if (typeof sql === "string") {
307 const r = await d1.prepare(sql).all();
308 return {
309 rows: r.results || [],
310 rowsAffected: r.meta?.changes ?? 0,
311 };
312 }
313 const r = await d1
314 .prepare(sql.sql)
315 .bind(...sql.args)
316 .all();
317 return { rows: r.results || [], rowsAffected: r.meta?.changes ?? 0 };
318 },
319 };
320 return;
321 }

Callers

nothing calls this directly

Calls 7

sqliteToPostgresParamsFunction · 0.85
initClientFunction · 0.85
sanitizeFunction · 0.85
allMethod · 0.80
prepareMethod · 0.80
bindMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected