Files
EpicNext-Cms/scripts/sql-statements.ts
openhands df38dccbf1
Local Build and Deploy / deploy (push) Failing after 46s
style: format code biome
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);
}