QueryExecutor
Corex\Database\QueryExecutor · class · Core layer
The only place that instantiates WP_Query. Runs the args the QueryBuilder built, hydrates each post into a Model, and returns a Collection. Eager loading of belongs-to relations is added by US4.
Public API
Section titled “Public API”__construct(Hydrator $hydrator, ConfigInterface $config)
Section titled “__construct(Hydrator $hydrator, ConfigInterface $config)”maxResults(): int
Section titled “maxResults(): int”The configured cap a QueryBuilder applies to an unbounded query (FR-015).
run(array $args, string $modelClass, array $relations): Collection
Section titled “run(array $args, string $modelClass, array $relations): Collection”collectRelatedIds(array $models, string $foreignKey): array
Section titled “collectRelatedIds(array $models, string $foreignKey): array”Distinct related post ids referenced by a belongs-to foreign key across the given models (empty/zero keys are skipped). Pure — unit-testable.