import { Tuple } from '../../codec.js'; import { CountOptions, KVStore, KVStoreTransaction, ScanOptions, TxStatus } from '../../types.js'; export declare class MemoryTransaction implements KVStoreTransaction { storage: KVStore; private sets; private deletes; private _status; constructor(storage: KVStore, sets?: KVStore, deletes?: KVStore); get status(): TxStatus; scope(prefix: Tuple): KVStoreTransaction; clear(prefix?: Tuple): Promise; get(key: Tuple, prefix?: Tuple): Promise; set(key: Tuple, value: any, prefix?: Tuple): Promise; delete(key: Tuple, prefix?: Tuple): Promise; /** * Need to properly merge the scan results from the store and the edits. * This should remove any keys that have been deleted in the edits, aply updates, and add new keys. * For the addition of new keys, proper lexicographical ordering should occur to ensure the correct order. */ scan(scanOptions: ScanOptions, prefix?: Tuple): AsyncIterable<[Tuple, any]>; scanValues(scanOptions: ScanOptions, prefix?: Tuple): AsyncIterable; count(options: CountOptions, prefix?: Tuple): Promise; commit(): Promise; private checkTxStatusBeforeOperation; cancel(): void; }