QueryHelper
Class helps to handle Query with relations
Tags
Table of Contents
Methods
- decompose() : Collection
- Decomposition for Queries with 1:N and N:M relations
- getPrimaryFilter() : ConditionTree
Methods
decompose()
Decomposition for Queries with 1:N and N:M relations
public
static decompose(Query $query[, bool $fairLimit = true ][, bool $separateRelations = true ]) : Collection
Parameters
- $query : Query
- $fairLimit : bool = true
-
Option to select only ID first, then other data
- $separateRelations : bool = true
-
Option to separate 1:N and N:M relations
Tags
Return values
CollectiongetPrimaryFilter()
public
static getPrimaryFilter(array<string|int, mixed> $primaryNames, array<string|int, mixed> $primaryValues) : ConditionTree
Parameters
- $primaryNames : array<string|int, mixed>
- $primaryValues : array<string|int, mixed>