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

    Function writeHeapSnapshot

    • Writes a heap into the object's own SQLite.

      Elides, chunks, then inserts each chunk as a bound BLOB parameter (base64 would become statement text and blow DO_SQLITE_MAX_STATEMENT_CHARS). The fd table is stored with the bytes it belongs to, never rebuilt from another instance.

      Parameters

      • sql: HeapSql
      • opts: {
            chunkBytes?: number;
            generation: string;
            handles?: HandleRecord[];
            heap: Uint8Array;
            nowMs: number;
            pageBytes?: number;
            streams: StreamRecord[];
        }

      Returns {
          compressedBytes: number;
          digest: string;
          id: number;
          keptPages: number;
          root: string;
          rows: number;
          storedBytes: number;
      }

      • compressedBytes: number
      • digest: string
      • id: number
      • keptPages: number
      • root: string

        the integrity root of what was written, for the caller to seal outside SQL

      • rows: number
      • storedBytes: number