allSorted()
Home > @gooddata/sdk-backend-spi > IPagedResource > allSorted
IPagedResource.allSorted() method
Request all the pages merged in a single array and sort them using the given comparator.
Signature:
allSorted(compareFn: (a: TItem, b: TItem) => number): Promise<TItem[]>;
Parameters
Parameter | Type | Description |
---|---|---|
compareFn | (a: TItem, b: TItem) => number | the compare function to use - the semantics are the same os for the Array.sort parameter |
Returns:
Promise<TItem[]>
promise of an array for all the pages' contents in one array
Remarks
This MUST respect all the original query settings except for the paging settings (e.g. offset, limit).