import { IDatabaseStore } from './store'; import { DatabaseSchema, SchemaKey, SchemaValue } from './types'; export interface IDatabaseBatch { /** * How many queued operations are in the batch */ readonly size: number; /** * Put a value into the database with the given key. * @param store - The [[`IDatabaseStore`]] to put the value into * @param key - The key to insert * @param value - The value to insert * * @returns The batch for chaining operations onto */ put(store: IDatabaseStore, key: SchemaKey, value: SchemaValue): IDatabaseBatch; /** * Delete a value in the database with the given key. * @param store - The [[`IDatabaseStore`]] to delete the key from * @param key - The key to delete * * @returns The batch for chaining operations onto */ del(store: IDatabaseStore, key: SchemaKey): IDatabaseBatch; /** Commit the batch atomically to the database */ commit(): Promise; } export type BatchOperation, Value extends SchemaValue> = [IDatabaseStore, Key, Value] | [IDatabaseStore, Key]; //# sourceMappingURL=batch.d.ts.map