import * as sqlite3 from 'sqlite3'; import { MultiDbManager, Dimension } from './multi-db-manager'; /** * Transaction operation that can be executed within a transaction */ export type TransactionOperation = (db: sqlite3.Database) => Promise; /** * Manages transactions across multiple databases (all 5 dimensions). * Ensures atomicity: either all operations succeed or all are rolled back. */ export declare class TransactionManager { private dbManager; private activeTransactions; /** * Creates a new TransactionManager instance. * * @param dbManager The MultiDbManager instance */ constructor(dbManager: MultiDbManager); /** * Begins a transaction on a database. * * @param db The SQLite database instance * @returns Promise that resolves when the transaction is begun */ private beginTransaction; /** * Commits a transaction on a database. * * @param db The SQLite database instance * @returns Promise that resolves when the transaction is committed */ private commitTransaction; /** * Rolls back a transaction on a database. * * @param db The SQLite database instance * @returns Promise that resolves when the transaction is rolled back */ private rollbackTransaction; /** * Executes operations in a transaction across multiple dimensions. * If any operation fails, all transactions are rolled back. * * @param operations Map of dimension to operation function * @returns Promise that resolves when all operations succeed, or rejects if any fail */ executeTransaction(operations: Map): Promise; /** * Executes operations in a transaction across all dimensions. * * @param operations Map of dimension to operation function * @returns Promise that resolves when all operations succeed */ executeTransactionAll(operations: Map): Promise; /** * Checks if there are any active transactions. * * @returns True if there are active transactions */ hasActiveTransactions(): boolean; /** * Gets the list of dimensions with active transactions. * * @returns Array of dimensions with active transactions */ getActiveTransactionDimensions(): Dimension[]; } //# sourceMappingURL=transaction-manager.d.ts.map