[CDRIVER-2796] Make ObjectId, timestamp, datetime overwritable Created: 15/Aug/18 Updated: 28/Oct/23 Resolved: 07/Sep/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.13.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kaitlin Mahar | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
In libbson, it is possible to overwrite some of the fixed-length types (bool, int32, int64, double, decimal128) in place on a bson_t using bson_iter_overwrite_[typename]. We utilize this functionality in the Swift driver to avoid creating a new bson_t when one of those types is overwritten with a new value of the same type. Since ObjectIds are also fixed length, it would be useful if they could similarly be overwritten in-place. |
| Comments |
| Comment by Githook User [ 07/Sep/18 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: Add bson_iter_overwrite_date_time, bson_iter_overwrite_oid, and |
| Comment by Kaitlin Mahar [ 16/Aug/18 ] |
|
oh yes, those are also fixed length. makes sense to me. |
| Comment by Kevin Albertson [ 16/Aug/18 ] |
|
Good point, I assume we should also do also this for the timestamp and datetime types? |