axiodb
Version:
The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor
22 lines (21 loc) • 1.04 kB
TypeScript
import { ErrorInterface, SuccessInterface } from "../../config/Interfaces/Helper/response.helper.interface";
import { TransactionOperation } from "../../config/Interfaces/Transaction/transaction.interface";
export default class TransactionIndexManager {
private readonly collectionPath;
private readonly indexFolderPath;
private readonly indexMetaPath;
private readonly FileManager;
private readonly Converter;
private readonly ResponseHelper;
private readonly ReadIndexService;
private readonly transactionId;
private stagedIndexUpdates;
private readonly isEncrypted;
private readonly encryptionKey?;
constructor(collectionPath: string, transactionId: string, isEncrypted?: boolean, encryptionKey?: string);
resolveQueryToDocumentIds(query: object): Promise<string[]>;
stageIndexUpdates(operations: TransactionOperation[]): Promise<void>;
commitIndexUpdates(): Promise<SuccessInterface | ErrorInterface>;
rollbackIndexUpdates(): Promise<void>;
private getAllDocumentFiles;
}