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
46 lines (45 loc) • 1.15 kB
TypeScript
export interface TransactionOperation {
type: 'INSERT' | 'UPDATE' | 'DELETE';
documentId?: string;
query?: object;
data?: object;
fileName?: string;
oldData?: object;
savepointName?: string;
}
export interface WALEntry {
transactionId: string;
timestamp: string;
operationType: 'INSERT' | 'UPDATE' | 'DELETE';
documentId: string;
fileName: string;
beforeData?: string;
afterData?: string;
checksum: string;
savepointName?: string;
}
export interface TransactionMetadata {
transactionId: string;
collectionPath: string;
status: 'ACTIVE' | 'PREPARING' | 'COMMITTED' | 'ABORTED';
startTime: string;
lockedDocuments: string[];
isolationLevel: 'READ_COMMITTED' | 'REPEATABLE_READ';
}
export interface LockInfo {
documentId: string;
transactionId: string;
lockType: 'WRITE';
timestamp: number;
}
export interface Savepoint {
name: string;
operationIndex: number;
timestamp: string;
lockedDocumentsSnapshot: string[];
}
export interface SessionOptions {
defaultTimeout?: number;
retryWrites?: boolean;
maxRetries?: number;
}