(
entityName: EntityName<T>,
where: FilterQuery<T>,
options: FindOptions<T, any, any, any>,
)
| 280 | } |
| 281 | |
| 282 | async *streamVirtual<T extends object>( |
| 283 | entityName: EntityName<T>, |
| 284 | where: FilterQuery<T>, |
| 285 | options: FindOptions<T, any, any, any>, |
| 286 | ): AsyncIterableIterator<EntityData<T>> { |
| 287 | const meta = this.metadata.find(entityName)!; |
| 288 | |
| 289 | if (meta.expression instanceof Function) { |
| 290 | const em = this.createEntityManager(); |
| 291 | const stream = await meta.expression(em, where as any, options, true); |
| 292 | yield* stream as EntityData<T>[]; |
| 293 | |
| 294 | return; |
| 295 | } |
| 296 | |
| 297 | /* v8 ignore next */ |
| 298 | return super.findVirtual(entityName, where, options); |
| 299 | } |
| 300 | |
| 301 | async count<T extends object>( |
| 302 | entityName: EntityName<T>, |
no test coverage detected