UNPKG

datastore-core

Version:
20 lines 837 B
import { Key } from 'interface-datastore'; import { KeyTransformDatastore } from './keytransform.js'; import type { Datastore, Query, Pair, KeyQuery } from 'interface-datastore'; import type { AbortOptions } from 'interface-store'; /** * Wraps a given datastore into a keytransform which * makes a given prefix transparent. * * For example, if the prefix is `new Key(/hello)` a call * to `store.put(new Key('/world'), mydata)` would store the data under * `/hello/world`. */ export declare class NamespaceDatastore extends KeyTransformDatastore { private readonly iChild; private readonly iKey; constructor(child: Datastore, prefix: Key); query(q: Query, options?: AbortOptions): AsyncIterable<Pair>; queryKeys(q: KeyQuery, options?: AbortOptions): AsyncIterable<Key>; } //# sourceMappingURL=namespace.d.ts.map