Named Query Technical Reference
Summary
- Named Queries are stored in NamedQuery section of Initial Adaptable State
Named Query State
The NamedQuery section of Initial Adaptable State contains just a single collection:
| Property | Type | Description |
|---|---|---|
| NamedQueries | NamedQuery[] | Named Queries which can be referenced in other Expressions |
Named Query
A Named Query has a single string property called Name:
| Property | Type | Description |
|---|---|---|
| Name | string | Name of the Query, used to reference it in AdaptableQL Expressions |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
It inherits from AdaptableBooleanQuery which also has a single property:
| Property | Type | Description |
|---|---|---|
| BooleanExpression | string | AdapTableQL Expression that returns true / false |
Named Query API
| Method | Returns | Description |
|---|---|---|
| addNamedQueries(namedQueries) | void | Adds multiple new Named Query to Adaptable State |
| addNamedQuery(namedQueries) | void | Adds a new Named Query to Adaptable State |
| getNamedQueries() | NamedQuery[] | Gets all Named Queries in Adaptable State |
| getNamedQueryByName(namedQueryName) | NamedQuery | undefined | Retrieves Named Query with given name from State |
| getNamedQueryState() | NamedQueryState | Retrieves Query section from Adaptable State |
| isValidNamedQuery(namedQuery) | NamedQueryValidationResult | Checks if the given Named Query has a valid name |
| openNamedQuerySettingsPanel() | void | Opens Settings Panel with Query section selected and visible |
| runNamedQuery(namedQuery) | void | Runs the given Named Query |
| runQueryByName(queryName) | void | Runs Named Query which has given name |