drupflare/worker - v1.0.0
    Preparing search index...

    Function splitSqlStatements

    • Splits a SQL dump into individual statements.

      Quote-aware, because a naive split on ; breaks the moment a dump contains one inside a string -- and a Drupal dump certainly does: serialised config, rendered HTML and watchdog messages are full of them. Getting this wrong would not error; it would replay a truncated statement and leave a plausible database, which is this project's signature failure.

      SQLite string literals escape a quote by doubling it, so a '' inside a quoted run is content and not a terminator.

      Parameters

      • dump: string

      Returns string[]