mongoose-aggregation-wrapper
Version:
🚀 TypeScript wrapper for debugging MongoDB/Mongoose aggregation pipelines stage-by-stage. Debug complex aggregations, optimize performance, and understand data flow with detailed execution timing and sample results.
12 lines (11 loc) • 388 B
TypeScript
/**
* Mongoose Aggregation Pipeline Debugger Wrapper
* Executes each stage of an aggregation pipeline step by step and logs results
*/
export interface WrapperOptions {
allowDiskUse?: boolean;
debug?: boolean;
logResults?: boolean;
}
export declare function Wrapper<T = any>(model: any, pipeline: unknown[], options?: WrapperOptions): Promise<T[]>;
export default Wrapper;