IElementsQuery
Service to query valid attribute elements for particular display form.
export interface IElementsQuery extends ICancelable<IElementsQuery>
Extends: ICancelable<IElementsQuery>
Methods
Method | Description |
|---|---|
Starts the valid elements query. | |
Sets the attribute filters that will limit the available elements | |
Sets the catalog objects based on which the elements are validated, i.e., if set, only the elements that are available with these metrics, attributes, etc. are returned. Note that this functionality is not supported by every backend. | |
Sets the date filters that will limit the available elements | |
Sets number of valid elements to return per page. Default limit is specific per backend | |
Sets the measures that will limit the available elements - only elements for which the measures have data will be returned. | |
Sets starting point for the query. Backend WILL return no data if the offset is greater than total number of valid elements. Default offset: 0 | |
Allows to specify advanced options for the elements query. |
Method details
IElementsQuery.query()method
Starts the valid elements query.
query(): Promise<IElementsQueryResult>;
Returns
Promise<IElementsQueryResult>
promise of first page of the results
IElementsQuery.withAttributeFilters()method
Sets the attribute filters that will limit the available elements
withAttributeFilters(filters: IElementsQueryAttributeFilter[]): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
filters | attribute filters limiting the elements |
Returns
element query
IElementsQuery.withAvailableElementsOnly()method
Sets the catalog objects based on which the elements are validated, i.e., if set, only the elements that are available with these metrics, attributes, etc. are returned.
Note that this functionality is not supported by every backend.
withAvailableElementsOnly(validateBy: ObjRef[]): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
validateBy | ObjRef[] | metric, attributes, or other objects the elements are validated by. |
Returns
element query
IElementsQuery.withDateFilters()method
Sets the date filters that will limit the available elements
withDateFilters(filters: (IRelativeDateFilter | IAbsoluteDateFilter)[]): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
filters | date filters limiting the elements |
Returns
element query
IElementsQuery.withLimit()method
Sets number of valid elements to return per page. Default limit is specific per backend
withLimit(limit: number): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
limit | number | desired max number of valid elements per page; must be a positive number |
Returns
element query
IElementsQuery.withMeasures()method
Sets the measures that will limit the available elements - only elements for which the measures have data will be returned.
withMeasures(measures: IMeasure[]): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
measures | IMeasure[] | measures limiting the elements |
Returns
element query
IElementsQuery.withOffset()method
Sets starting point for the query. Backend WILL return no data if the offset is greater than total number of valid elements. Default offset: 0
withOffset(offset: number): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
offset | number | zero indexed, must be non-negative |
Returns
element query
IElementsQuery.withOptions()method
Allows to specify advanced options for the elements query.
withOptions(options: IElementsQueryOptions): IElementsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
options | advanced options |
Returns
element query