UNPKG

datastore-core

Version:
23 lines 1.25 kB
import type { Batch, Datastore, Key, KeyQuery, Pair, Query } from 'interface-datastore'; import type { AbortOptions, Await, AwaitIterable } from 'interface-store'; export declare class BaseDatastore implements Datastore { put(key: Key, val: Uint8Array, options?: AbortOptions): Await<Key>; get(key: Key, options?: AbortOptions): Await<Uint8Array>; has(key: Key, options?: AbortOptions): Await<boolean>; delete(key: Key, options?: AbortOptions): Await<void>; putMany(source: AwaitIterable<Pair>, options?: AbortOptions): AwaitIterable<Key>; getMany(source: AwaitIterable<Key>, options?: AbortOptions): AwaitIterable<Pair>; deleteMany(source: AwaitIterable<Key>, options?: AbortOptions): AwaitIterable<Key>; batch(): Batch; /** * Extending classes should override `query` or implement this method */ _all(q: Query, options?: AbortOptions): AwaitIterable<Pair>; /** * Extending classes should override `queryKeys` or implement this method */ _allKeys(q: KeyQuery, options?: AbortOptions): AwaitIterable<Key>; query(q: Query, options?: AbortOptions): AwaitIterable<Pair>; queryKeys(q: KeyQuery, options?: AbortOptions): AwaitIterable<Key>; } //# sourceMappingURL=base.d.ts.map