Skip to content

Commit 526fc0b

Browse files
Add query example that returns all aggregated objects (#194)
1 parent e25c086 commit 526fc0b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Visit [Eiffel Community](https://eiffel-community.github.io) to get started and
4343
- [**Query aggregated objects**](./wiki/Query.md)
4444
- [**Perform query on created aggregated object**](./wiki/Query.md#Perform-query-on-created-aggregated-object)
4545
- [**Perform freestyle query on created aggregated object**](./wiki/Query.md#Perform-freestyle-query-on-created-aggregated-object)
46+
- [**Example of freestyle query that returns all aggregated objects**](./wiki/Query.md#Example-of-freestyle-query-that-returns-all-aggregated-objects)
4647
- [**Query an aggregated object and filter it with specific key**](./wiki/Query.md#Query-an-aggregated-object-and-filter-it-with-specific-key)
4748
- [**Query missed notifications**](./wiki/Query.md#Query-missed-notifications)
4849
- [**Running rules on objects**](./wiki/Running-rules-on-objects.md)

wiki/Query.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ Examples of criterias:
109109
```
110110
NOTE: It should be noted that "object" is a key word. It is replaced dynamically in the code, and is configured in the application.properties file. e.g.,In string "object.testCaseExecutions.outcome.id", substring "object" is a key word.
111111

112+
## Example of freestyle query that returns all aggregated objects
113+
By using a query that contains only empty "criteria" it is possible to return all aggregated objects from the database. The aggregated objects will be returned from specific collection (which name is defined by property aggregated.collection.name) that is stored in specific database (which name is defined by property spring.data.mongodb.database). All properties can be found in [application's properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties).
114+
115+
Example:
116+
``` javascript
117+
118+
{
119+
"criteria": {}
120+
}
121+
122+
```
123+
112124
## Query an aggregated object and filter it with specific key
113125
It is possible to filter the object and return only values with specific key or path. To do this, it is required to add filter condition to the json body. The parameter of filter condition is a JMESPath expression, you can read more about that [here](http://jmespath.org/tutorial.html#pipe-expressions).
114126

0 commit comments

Comments
 (0)