2024-07-30 23:33:33 +08:00
|
|
|
import type { KV, KvKey } from "../../plug-api/types.ts";
|
2023-09-04 03:15:17 +08:00
|
|
|
|
|
|
|
export type KvQueryOptions = {
|
|
|
|
prefix?: KvKey;
|
|
|
|
};
|
|
|
|
|
|
|
|
export interface KvPrimitives {
|
2023-10-03 20:16:33 +08:00
|
|
|
batchGet(keys: KvKey[]): Promise<(any | undefined)[]>;
|
2023-09-04 03:15:17 +08:00
|
|
|
batchSet(entries: KV[]): Promise<void>;
|
|
|
|
batchDelete(keys: KvKey[]): Promise<void>;
|
|
|
|
query(options: KvQueryOptions): AsyncIterableIterator<KV>;
|
2023-12-10 20:23:42 +08:00
|
|
|
close(): void;
|
|
|
|
}
|