MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / parseSchema

Function parseSchema

packages/wl-sdk/scripts/sql-parser.ts:300–308  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

298}
299
300export function parseSchema(sql: string): ParsedSchema {
301 const statements = splitStatements(sql);
302 const tables: ParsedTable[] = [];
303 for (const stmt of statements) {
304 const table = parseCreateTable(stmt);
305 if (table) tables.push(table);
306 }
307 return { tables, statements };
308}

Callers 3

sql-parser.test.tsFile · 0.90
emitSchemaFileFunction · 0.90
mainFunction · 0.90

Calls 3

splitStatementsFunction · 0.85
parseCreateTableFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected