[CXX-267] Include regex elements in BSONArrayBuilder Created: 01/Jul/14 Updated: 14/Aug/14 Resolved: 08/Jul/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | legacy-1.0.0-rc0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Fermín Galán Márquez | Assignee: | Tyler Brock |
| Resolution: | Done | Votes: | 0 |
| Labels: | legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The BSONArrayBuilder class in the MongoDB C++ driver API (http://api.mongodb.org/cplusplus/current/classmongo_1_1_b_s_o_n_array_builder.html) allows to build BSON arrays, eg.
will do a query equal to the following at mongo shell:
However, It seems that BSONArrayBuilder lacks a method to build a query based on regex instead of strings, in the following way (that works at mongo shell):
This issue is about implementing the above functionality (or maybe I'm wrong... Note that Note that BSONObjBuilder class (http://api.mongodb.org/cplusplus/current/classmongo_1_1_b_s_o_n_obj_builder.html) has an appendRegex() method... I wonder why a similar method has not been included in the BSONArrayBuilder class. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 01/Jul/14 ] |
|
Hi fgalan@gmail.com - I'm guessing this is just an oversight. You should feel free to send us a pull request with a fix, or we will try to get to it in the next release cycle for the legacy driver. Thanks, |