CompactResult
Type Stability: stable
Related guide: Persistence and sync →
Definition
TypeScript
import type { CompactResult } from '@aionbuilders/nabu';TypeScript
interface CompactResult {
bytesAfter?: number;
bytesBefore?: number;
compacted: boolean;
deleted?: string[];
error?: unknown;
reason?: CompactRefusal;
released?: string[];
skipped?: string[];
snapshot?: Uint8Array<ArrayBufferLike>;
}Properties
| Property | Type | Description |
|---|---|---|
bytesAfteroptional | number | size of the compacted snapshot that was saved |
bytesBeforeoptional | number | size of the complete snapshot (what |
compacted | boolean | n/a |
deletedoptional | string[] | the released files whose bytes were deleted from the store (no other document used them) |
erroroptional | unknown | the error behind |
reasonoptional | CompactRefusal | why nothing was compacted |
releasedoptional | string[] | files ( |
skippedoptional | string[] | released files nobody references but whose bytes were kept for now ( |
snapshotoptional | Uint8Array<ArrayBufferLike> | the compacted (shallow) snapshot that was saved |
Source: src/lib/persistence/compact.js:15