@dxos/echo
    Preparing search index...

    Function items

    • Collect the group's members, optionally ordered by order and capped to limit per group. Opt-in — groups carry no members unless this aggregate is declared.

      order is this aggregate's own per-group ordering — independent of any orderBy elsewhere in the query, which orders the whole input stream (and, following aggregate, the resulting groups), not this aggregate's member selection. Without order, members keep whatever order they arrived in from a preceding orderBy (unspecified if there is none), so a per-group top-limit moved position in the chain would silently change; declaring order here makes the ordering explicit and local to this aggregate regardless of where it sits.

      Type Parameters

      • T

      Parameters

      • Optionaloptions: { limit?: number; order?: Order.Any[] }

      Returns Aggregate.Aggregate<T, T[]>

      O(k) in the number of orders; builds an aggregate spec without evaluating anything.