[CXX-869] mongocxx::result::insert_many::inserted_ids() should be const Created: 19/Mar/16 Updated: 17/Nov/17 Resolved: 27/Feb/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Samuel Rossi (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
mongocxx::result::insert_many::inserted_ids() does not modify the object, is thread-safe, and does not affect the results of future methods calls, so it should be const. This is similar to result::bulk_write::upserted_ids(), which is already const. Original description:
Subsequent previous description:
|
| Comments |
| Comment by Githook User [ 27/Feb/17 ] |
|
Author: {u'username': u'saghm', u'name': u'Saghm Rossi', u'email': u'saghmrossi@gmail.com'}Message: |
| Comment by Samuel Rossi (Inactive) [ 24/Feb/17 ] |
|
As a result of the audit, we identified several places with incorrect constness. Most of these required API-breaking changes to fix, so they were put into CXX-1229 (which has fix version "future API change release". |
| Comment by David Golden [ 08/Sep/16 ] |
|
In particular, methods that interact with the database but don't modify the object should be made const, including CRUD methods like insert_one and find. |