Files
EpicNext-Cms/scripts/sql-statements.ts
T
openhands 2e4ed76121
Local Build and Deploy / deploy (push) Successful in 49s
style: format code with prettier
2026-07-12 21:07:34 +02:00

9 lines
259 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);
}