Class: RowSetResolver

RowSetResolver(allRows)

Resolves a set of candidate row-index Sets down to matching rows.

Constructor

new RowSetResolver(allRows)

Create a new resolver.
Parameters:
Name Type Description
allRows Array.<EngineResult> The full rows array to resolve against and to return unchanged when no candidate sets are added.
Source:

Methods

addCandidateSet(candidateSet)

Add a candidate row-index set that a matching row must belong to.
Parameters:
Name Type Description
candidateSet Set.<number> Row indices matching one filter dimension.
Source:

resolve() → {Array.<EngineResult>}

Resolve the rows matching every added candidate set. Returns all rows unchanged if no candidate sets were added (matching ReportDataWrapper's behavior of returning the raw data as-is when every filter field is null). Otherwise, intersects starting from the smallest candidate set so cost is bounded by the most selective filter rather than the full dataset. Each per-value set is populated in row order, so iterating the smallest set preserves the original array's relative ordering in the result.
Source:
Returns:
Matching rows, in original order.
Type
Array.<EngineResult>