[CXX-1059] Add aggregation pipeline class builder methods for new MongoDB 3.4 stages and $geoNear / $indexStats stages Created: 01/Oct/16 Updated: 13/Dec/16 Resolved: 28/Nov/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The pipeline class is currently missing methods associated with the new-in-MongoDB-3.4 pipeline stages:
It is also missing a method associated with the $indexStats stage (new in MongoDB 3.2), and the $geoNear stage. In addition, pipeline::unwind() needs a new overload that allows users to specify values for the "includeArrayIndex" and "preserveNullAndEmptyArrays" options (new in MongoDB 3.2). We should either add new builder methods to the pipeline class for all of these new stages, or we should deprecate the pipeline class entirely and instead have users pass array builders directly to collection::aggregate(). |
| Comments |
| Comment by Githook User [ 29/Nov/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: As a result of this work, this pipeline class is now up-to-date with Complete list of methods added: pipeline& add_fields(bsoncxx::document::view_or_value fields_to_add); |
| Comment by Githook User [ 29/Nov/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: Simplify implementation, clean up documentation, fix naming of a few |
| Comment by Githook User [ 28/Nov/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: As a result of this work, this pipeline class is now up-to-date with Complete list of methods added: pipeline& add_fields(bsoncxx::document::view_or_value fields_to_add); |
| Comment by Githook User [ 28/Nov/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: Simplify implementation, clean up documentation, fix naming of a few |
| Comment by David Golden [ 03/Nov/16 ] |
|
We also considered doing #1 to meet our 3.1 release goal and deferring options 2-4 for a post-3.1 release. (If we are considering dropping/deprecating pipeline builders or making other breaking API changes, we should queue that for 4.0 anyway.) If we don't get insight into #2 or #3 in the next week or so, I think we should move forward with #1 to close this ticket and open a new ticket for the other options on the table. |
| Comment by J Rassi [ 03/Nov/16 ] |
|
Me and David spoke in-person today about this. We discussed the following approaches:
Further research on what the approaches the other statically-typed languages take here would be useful. |
| Comment by David Golden [ 07/Oct/16 ] |
|
Also, consider overloading the aggregate command to take an arbitrary user document as the pipeline. |
| Comment by David Golden [ 07/Oct/16 ] |
|
Per discussions: another possibility is add ability to add arbitrary stage for forward compatibility. |