Files
Epicnabbo-Catalogus-Updated…/scripts/sql-statements.ts
T
2026-07-13 21:57:41 +02:00

11 lines
257 B
TypeScript

export function splitSqlStatements(sql: string): string[] {
const withoutComments = sql
.replace(/\/\*[\s\S]*?\*\//g, "")
.replace(/^\s*--.*$/gm, "");
return withoutComments
.split(";")
.map((statement) => statement.trim())
.filter(Boolean);
}