2023-10-03 12:16:33 +00:00
|
|
|
import { KV, KvKey } from "$sb/types.ts";
|
2023-09-03 19:15:17 +00:00
|
|
|
|
|
|
|
export type KvQueryOptions = {
|
|
|
|
prefix?: KvKey;
|
|
|
|
};
|
|
|
|
|
|
|
|
export interface KvPrimitives {
|
2023-10-03 12:16:33 +00:00
|
|
|
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>;
|
|
|
|
}
|