Метод aggregate

public

Сигнатура метода

public function aggregate(SourceRef $source, AggregateQuery $query, int $actorId): iterable

Возвращает: iterable

Описание

NORMATIVE (ALG-02, ADR D4). Push-down aggregate: the CRM factory computes GROUP BY and the aggregate functions on its own side, so only result rows (groups) — not raw source rows — reach PHP. It is the equivalent of the in-PHP fallback folding {@see self::extract()}: the same permissions ($actorId), the same field visibility ({@see VisibilityManager}) and the same period window are applied, so both paths yield identical groups and values. A group whose grouping field is hidden from the actor collapses to no rows (extract() would drop the field and the group key could not be built); a hidden function column yields the empty-set value (COUNT => 0, the rest => null), matching the in-PHP fold over a dropped column. Overflow is an error, never a silent truncation: the query reads limit + 1 groups and raises {@see RowLimitExceededException} when more than the limit come back.

Параметры

3
Имя Тип По умолчанию Флаги
$source SourceRef —
—
$query AggregateQuery —
—
$actorId int —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/integration/bizproc/datasource/datasourceprovider.php
Расположение метода в файле
Строки 493–551

Исходный код

PHP