/* tslint:disable */ /* eslint-disable */ /* auto-generated by NAPI-RS */ /** * Engine-level configuration. All fields are fixed by the FIRST opener of a * path (first-opener-wins); pass the same config from every worker. */ export interface DatabaseConfig { path: string /** Shared block-cache capacity in bytes. Caps resident set. Engine-level. */ cacheSizeBytes?: number } /** Open (or attach to) the shared writable engine for `config.path`. */ export declare function open(config: DatabaseConfig): Promise /** A key/value pair for [`Partition::insert_batch`]. */ export interface BatchEntry { key: Uint8Array value: Uint8Array } /** * Open (or attach to) the shared engine for `config.path` with a read-only * surface. May be the first opener (fjall always opens read-write underneath). */ export declare function openReadonly(config: DatabaseConfig): Promise export declare class Keyspace { partition(name: string): Promise /** * Destroy a partition and all its data. After the returned promise resolves, * calling `partition(name)` again creates a fresh, empty partition. */ deletePartition(name: string): Promise persist(mode?: string | undefined | null): Promise close(): Promise } export declare class Partition { /** Sync read. Reflects writes committed by any handle of the engine. */ get(key: Uint8Array): Buffer | null insert(key: Uint8Array, value: Uint8Array): Promise remove(key: Uint8Array): Promise insertBatch(entries: Array): Promise } export declare class ReadonlyKeyspace { partition(name: string): Promise close(): Promise } export declare class ReadonlyPartition { /** Sync read. Reflects writes committed by any handle of the engine. */ get(key: Uint8Array): Buffer | null }