(entity: T, options: LockOptions)
| 3080 | } |
| 3081 | |
| 3082 | override async lockPessimistic<T extends object>(entity: T, options: LockOptions): Promise<void> { |
| 3083 | const meta = helper(entity).__meta; |
| 3084 | const qb = this.createQueryBuilder(meta.class, options.ctx, undefined, undefined, options.logging).withSchema( |
| 3085 | options.schema ?? meta.schema, |
| 3086 | ); |
| 3087 | qb.setAbortOptions(pickAbortOptions(options)); |
| 3088 | const cond = Utils.getPrimaryKeyCond(entity, meta.primaryKeys); |
| 3089 | qb.select(raw('1')) |
| 3090 | .where(cond as any) |
| 3091 | .setLockMode(options.lockMode, options.lockTableAliases); |
| 3092 | await this.rethrow(qb.execute()); |
| 3093 | } |
| 3094 | |
| 3095 | protected buildPopulateWhere<T extends object>( |
| 3096 | meta: EntityMetadata<T>, |
nothing calls this directly
no test coverage detected