(res: EntityData<Entity>[], limit?: number)
| 2630 | } |
| 2631 | |
| 2632 | private mapResults(res: EntityData<Entity>[], limit?: number): Loaded<Entity, Hint, Fields>[] { |
| 2633 | const entities: Loaded<Entity, Hint, Fields>[] = []; |
| 2634 | |
| 2635 | for (const row of res) { |
| 2636 | const entity = this.mapResult(row); |
| 2637 | this.propagatePopulateHint(entity as Entity, this.#state.populate); |
| 2638 | entities.push(entity); |
| 2639 | |
| 2640 | if (limit != null && --limit === 0) { |
| 2641 | break; |
| 2642 | } |
| 2643 | } |
| 2644 | |
| 2645 | return Utils.unique(entities); |
| 2646 | } |
| 2647 | |
| 2648 | /** |
| 2649 | * Executes the query, returning the first result or null |
no test coverage detected