-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
I'm looking for similar behavior as @nestjs/mongoose:
import { Injectable, Logger } from '@nestjs/common';
import { InjectConnection } from '@nestjs/mongoose';
@Injectable()
export class MyService {
private readonly logger = new Logger(MyService.name);
// eslint-disable-next-line no-useless-constructor
constructor(
@InjectConnection() private dbConnection: Connection,
) {}
async test() {
const transaction = await this.dbConnection.startSession();
await transaction.withTransaction(async () => { ... /* my transactions */ ... })
transaction.endSession();
return
}
}Is this something that we can add to the lib?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels