[CXX-1215] Implement `transform_document` helper Created: 31/Jan/17 Updated: 02/Feb/17 Resolved: 02/Feb/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Samuel Rossi (Inactive) | Assignee: | Samuel Rossi (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Because bsoncxx::document::value (and bsoncxx::document::view) are immutable, changing a field in a document requires building a new document from scratch, which is cumbersome (especially with deeply-nested fields). To facilitate creating copies of documents with changed fields, a `transform_document` function should be implemented. |
| Comments |
| Comment by Githook User [ 02/Feb/17 ] | ||||||
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: | ||||||
| Comment by Githook User [ 02/Feb/17 ] | ||||||
|
Author: {u'username': u'saghm', u'name': u'Saghm Rossi', u'email': u'saghmrossi@gmail.com'}Message: | ||||||
| Comment by J Rassi [ 01/Feb/17 ] | ||||||
|
Re-opening to address build failure introduced by the above:
| ||||||
| Comment by Githook User [ 01/Feb/17 ] | ||||||
|
Author: {u'username': u'saghm', u'name': u'Saghm Rossi', u'email': u'saghmrossi@gmail.com'}Message: |