MCPcopy Index your code
hub / github.com/BuilderIO/agent-native / parseSqlArgs

Function parseSqlArgs

packages/core/src/scripts/db/query.ts:26–35  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

24}
25
26function parseSqlArgs(raw: string | undefined): unknown[] {
27 if (!raw) return [];
28 try {
29 const parsed = JSON.parse(raw);
30 if (Array.isArray(parsed)) return parsed;
31 } catch {
32 // Fall through to the shared error below.
33 }
34 fail("--args must be a JSON array");
35}
36
37function convertQuestionMarksToPostgresParams(sql: string): string {
38 let index = 0;

Callers 1

dbQueryFunction · 0.70

Calls 1

failFunction · 0.90

Tested by

no test coverage detected