UNPKG

datastore-core

Version:
30 lines 1.08 kB
import { BaseDatastore } from './base.js'; import type { Batch, Datastore, Key, KeyQuery, Pair, Query } from 'interface-datastore'; import type { AbortOptions } from 'interface-store'; /** * A datastore that can combine multiple stores inside various * key prefixes */ export declare class MountDatastore extends BaseDatastore { private readonly mounts; constructor(mounts: Array<{ prefix: Key; datastore: Datastore; }>); /** * Lookup the matching datastore for the given key */ private _lookup; put(key: Key, value: Uint8Array, options?: AbortOptions): Promise<Key>; /** * @param {Key} key * @param {Options} [options] */ get(key: Key, options?: AbortOptions): Promise<Uint8Array>; has(key: Key, options?: AbortOptions): Promise<boolean>; delete(key: Key, options?: AbortOptions): Promise<void>; batch(): Batch; query(q: Query, options?: AbortOptions): AsyncIterable<Pair>; queryKeys(q: KeyQuery, options?: AbortOptions): AsyncIterable<Key>; } //# sourceMappingURL=mount.d.ts.map