UNPKG

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

18 lines (17 loc) 961 B
import { ErrorInterface, SuccessInterface } from "../../config/Interfaces/Helper/response.helper.interface"; import { TransactionMetadata } from "../../config/Interfaces/Transaction/transaction.interface"; export default class TransactionRegistry { private readonly collectionPath; private readonly registryPath; private readonly transactionDir; private readonly FileManager; private readonly FolderManager; private readonly Converter; private readonly ResponseHelper; constructor(collectionPath: string); registerTransaction(metadata: TransactionMetadata): Promise<SuccessInterface | ErrorInterface>; updateTransactionStatus(txnId: string, status: 'ACTIVE' | 'PREPARING' | 'COMMITTED' | 'ABORTED'): Promise<SuccessInterface | ErrorInterface>; getActiveTransactions(): Promise<TransactionMetadata[]>; removeTransaction(txnId: string): Promise<SuccessInterface | ErrorInterface>; private getAllTransactions; }