/** Runs SQLite DDL/DML statements one at a time - required by @capacitor-community/sqlite `execute()`. */
export async function executeMobileSqliteStatements(
  execute: (statement: string) => Promise<unknown>,
  statements: readonly string[]
): Promise<void> {
  for (const statement of statements) {
    const trimmed = statement.trim();

    if (!trimmed) {
      continue;
    }

    await execute(trimmed);
  }
}
