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

    Function storeImport

    • Stores a dump as replay chunks and returns what a loader will find.

      Atomic: the parent row and every chunk commit together, or a killed invocation leaves a row claiming N chunks that latestImport() offers as a restore point, and the replay would stop at the first missing chunk with the database half overwritten.

      Parameters

      • sql: SqlLike

        the object's own SQL

      • dump: string

        the SQL text, as dumpDatabase() or /export produces it

      • opts: {
            generation: string;
            nowMs: number;
            perChunk?: number;
            source: string;
            storage: StorageLike;
        }

        storage supplies the transaction; generation labels the import; source records where it came from, for the audit trail a rollback needs

      Returns StoredImport