Query Supplier
Overview
Provides access to the query objects created by reporters such as local-reporter, content-reporter, etc.
This is most easily accessible either via the 'query' key of the Report Supplier, or by storing the query in a variable using report-variable.
Details
Name: | Query Supplier |
Prefix: | query(optional) |
Supported Content: | Queries |
Provided By: | Reporting for Confluence, from version 3.3.0 |
Supported Keys
The following are the list of keys which this supplier will return a value for.
Key | Content Types | Return Type | Description |
size | Queries | Number | Returns the number of items that would be returned by the query, if executed at this moment. This may be a very expensive operation for some types of queries, as it may require executing and loading the whole result set into memory. |
as collection | Queries | List of Anything | Executes the query and returns the results as a Collection. May be an expensive operation for both memory and performance on very large queries, as it will load all results into memory. |
Examples
Storing a query in a variable
This will store a list of all pages starting with 'Foo' in the 'My Query' variable.
{report-variable:My Query} {local-reporter:page:children} {text-filter:page:title|include=Foo.*} {local-reporter}{report-variable} {report-list} {local-reporter:variable:My Query} {report-header}Size: {report-info:report:query > query:size}{report-header} {report-body}{report-info:page:title|link=true}{report-body} {report-empty}_No children starting with 'Foo'.{report-empty}{report-list}