UNPKG

@nestjs/mongoose

Version:

MongoDB for NestJS through Mongoose: schemas as decorated classes, injectable models, hooks and multiple connections.

5 lines • 337 B
import { Inject } from '@nestjs/common'; import { getConnectionToken, getModelToken } from './mongoose.utils.js'; export const InjectModel = (model, connectionName) => Inject(getModelToken(model, connectionName)); export const InjectConnection = (name) => Inject(getConnectionToken(name)); //# sourceMappingURL=mongoose.decorators.js.map