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
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 v3.3.0 |
Supported Keys
List of keys that this supplier returns 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
Stores 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}