1
0
silverbullet/plugos/lib/kv_primitives.ts

13 lines
335 B
TypeScript
Raw Normal View History

import { KV, KvKey } from "$sb/types.ts";
2023-09-03 19:15:17 +00:00
export type KvQueryOptions = {
prefix?: KvKey;
};
export interface KvPrimitives {
batchGet(keys: KvKey[]): Promise<(any | undefined)[]>;
2023-09-03 19:15:17 +00:00
batchSet(entries: KV[]): Promise<void>;
batchDelete(keys: KvKey[]): Promise<void>;
query(options: KvQueryOptions): AsyncIterableIterator<KV>;
}