src/libmongoc/tests/json/crud/legacy/v1/read/distinct.json
raw| 1 | { |
| 2 | "data": [ |
| 3 | { |
| 4 | "_id": 1, |
| 5 | "x": 11 |
| 6 | }, |
| 7 | { |
| 8 | "_id": 2, |
| 9 | "x": 22 |
| 10 | }, |
| 11 | { |
| 12 | "_id": 3, |
| 13 | "x": 33 |
| 14 | } |
| 15 | ], |
| 16 | "tests": [ |
| 17 | { |
| 18 | "description": "Distinct without a filter", |
| 19 | "operation": { |
| 20 | "name": "distinct", |
| 21 | "arguments": { |
| 22 | "fieldName": "x", |
| 23 | "filter": {} |
| 24 | } |
| 25 | }, |
| 26 | "outcome": { |
| 27 | "result": [ |
| 28 | 11, |
| 29 | 22, |
| 30 | 33 |
| 31 | ] |
| 32 | } |
| 33 | }, |
| 34 | { |
| 35 | "description": "Distinct with a filter", |
| 36 | "operation": { |
| 37 | "name": "distinct", |
| 38 | "arguments": { |
| 39 | "fieldName": "x", |
| 40 | "filter": { |
| 41 | "_id": { |
| 42 | "$gt": 1 |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | }, |
| 47 | "outcome": { |
| 48 | "result": [ |
| 49 | 22, |
| 50 | 33 |
| 51 | ] |
| 52 | } |
| 53 | } |
| 54 | ] |
| 55 | } |