UNPKG

@mikro-orm/mongodb

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

17 lines (16 loc) 640 B
import { EntityRepository, type EntityName } from '@mikro-orm/core'; import type { Collection } from 'mongodb'; import type { MongoEntityManager } from './MongoEntityManager'; export declare class MongoEntityRepository<T extends object> extends EntityRepository<T> { protected readonly em: MongoEntityManager; constructor(em: MongoEntityManager, entityName: EntityName<T>); /** * Shortcut to driver's aggregate method. Available in MongoDriver only. */ aggregate(pipeline: any[]): Promise<any[]>; getCollection(): Collection<T>; /** * @inheritDoc */ getEntityManager(): MongoEntityManager; }