[SERVER-23371] Add support to construct Documents with an initializer list Created: 28/Mar/16  Updated: 14/Apr/16  Resolved: 30/Mar/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 3.3.4

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 12 (04/04/16)
Participants:

 Description   

Would allow something like this:

Document document = {{"a", 1}, {"b", "q"}};

instead of the current syntax, which can get hard to read with increasing numbers of fields:

Document document = DOC("a" << 1 << "b" << "q");



 Comments   
Comment by Githook User [ 30/Mar/16 ]

Author:

{u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'cswanson310@gmail.com'}

Message: SERVER-23371 Add initializer_list constructor for Documents.
Branch: master
https://github.com/mongodb/mongo/commit/e64e2aca73f7b3b7184c1b5cc8b6c3ff3af79f21

Generated at Thu Feb 08 04:03:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.