@nestjs/typeorm#InjectConnection TypeScript Examples

The following examples show how to use @nestjs/typeorm#InjectConnection. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: bill.subscriber.ts    From bank-server with MIT License 6 votes vote down vote up
/*
    NOTE: It need to use different services,
    that's why this subscriber is connected by the constructor.
   */
  constructor(
    @InjectConnection() readonly connection: Connection,
    private readonly _messageService: MessageService,
    private readonly _messageKeyService: MessageKeyService,
    private readonly _userService: UserService,
    private readonly _userAuthService: UserAuthService,
    private readonly _languageService: LanguageService,
    private readonly _transactionService: TransactionService,
    private readonly _billService: BillService,
  ) {
    connection.subscribers.push(this);
  }