import { CommandExecutor, Command, ExecutionResult, CursorResult, CursorOptions } from '../interfaces'; import { Document, MongoClient } from 'mongodb'; /** * MongoDB command executor implementation for Node.js */ export declare class MongoExecutor implements CommandExecutor { private client; private dbName; /** * Create a new MongoDB executor using a MongoDB client * @param client MongoDB client instance * @param dbName Database name */ constructor(client: MongoClient, dbName: string); /** * No-op - client lifecycle is managed by the user */ connect(): Promise; /** * No-op - client lifecycle is managed by the user */ close(): Promise; /** * Execute a series of MongoDB commands and return documents * @param commands Array of commands to execute * @returns Result of the last command as documents (not cursors) * @typeParam T - The type of documents that will be returned (defaults to Document) */ execute(commands: Command[]): Promise>; /** * Execute a series of MongoDB commands and return cursors * @param commands Array of commands to execute * @param options Options for cursor execution * @returns Cursor for FIND and AGGREGATE commands, null for other commands * @typeParam T - The type of documents that will be returned (defaults to Document) */ executeCursor(commands: Command[], options?: CursorOptions): Promise>; /** * Convert string ObjectIds to MongoDB ObjectId instances * @param obj Object to convert * @returns Object with converted ObjectIds */ private convertObjectIds; }