[CDRIVER-2373] IDL for functions that take flexible options Created: 14/Nov/17  Updated: 28/Oct/23  Resolved: 16/Apr/18

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.10.0

Type: New Feature Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CDRIVER-2340 Refactor mongoc_write_command_t's opt... Backlog
is depended on by CDRIVER-2355 Refactor mongoc_cmd_parts_assemble Closed
Problem/Incident
causes CDRIVER-2840 Delete Many and Update Many fail with... Closed
causes CDRIVER-2647 Factor _mongoc_write_command_execute ... Closed
Related
related to CDRIVER-2959 "validate" option is passed in command Closed
related to CDRIVER-2661 mongoc_bulk_update functions reject a... Closed
related to CDRIVER-2738 Bulk functions for insert, update, an... Closed
related to CDRIVER-2660 Fix libmongoc project path in generat... Closed
related to CDRIVER-2665 Consider allow_extra=True for bulk op... Closed
related to CDRIVER-2812 Parse gridfs options with IDL Closed
related to CDRIVER-2882 Parse change stream options with IDL Closed
Epic Link: Post-3.6 cleanup

 Description   

Define an IDL that describes the set of options accepted by mongoc_collection_insert_one and the other CDRIVER-2331 functions, by mongoc_collection_aggregate, mongoc_collection_find_and_modify_with_opts, and mongoc_collection_find_with_opts, by the bulk operations in CDRIVER-1525, by the other flexible functions in CDRIVER-1524, by the read/write command with opts functions in CDRIVER-1527, and any other functions I omitted that take "opts".

Process the IDL definition for each "opts" function and produce:

  • a strongly-typed struct with a field for each possible option
  • code that parses the bson_t opts once, validates each input field, and populates the struct
  • Sphinx markup that is automatically included in the appropriate place in the function's .rst documentation file


 Comments   
Comment by Githook User [ 16/Apr/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2373 mongoc_find_one_opts_t is unused
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/de07ea35d78e882516087bcce9c06a612224faf6

Comment by Githook User [ 16/Apr/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2373 delete can't bypass doc validation
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/551a8dbdf0afdfe5fb84494ef187f671da5b1dba

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for commands that write
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/690178d665b30281c5b5653da0f7f235e13baf25

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for create_index_with_opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a1c483ffa88ea6c86b907ddf0a6d0eb50446e610

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for create_bulk_operation
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b16cd1e84139ce337cad0fde63aa1bd4cbaca276

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 better error messages
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7a465526fbb7ebe8b48a3a87ea2096d154f42775

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 dead code
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d0871903aebaed70e8ba6690c85bd4638f1f1192

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for count_with_opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ce49eab235fe714ccee2cd238025ba8354cc4853

Comment by Githook User [ 05/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for command_with_opts functions
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/90c53004b48398f245688b6955d844589c14af7e

Comment by Githook User [ 04/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 leak parsing subdocuments from opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2326f67b20588c828755ea45ce11e04d0ff21258

Comment by Githook User [ 04/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 leak parsing subdocuments from opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/eae37a129650d1a020babca2678e5f24c3ac52d7

Comment by Githook User [ 04/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 delete_many has no "ordered" opt
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/68444fd994c02f5eea53262863f060290d6447bc

Comment by Githook User [ 04/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 redundant "opts" documentation
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/853bae6090bcf78ec97f660335f8b73f7a86b70b

Comment by Githook User [ 04/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for bulk insert docs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d26893c704aa94bdd162d2ed3e2baadf8ec9304f

Comment by Githook User [ 02/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 more IDL for insert/remove
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/db384740ed0f81c1a044f764e369fe8f26ce1438

Comment by Githook User [ 01/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 IDL for delete_one/many

Also, only insert_many accepts "ordered".
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a5bf60431db6b6b347fed8ce318d81c798a69e13

Comment by Githook User [ 01/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 use IDL for update and replace
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/5b0400ced963976c1c9bd6fb0d0674e23ea06333

Comment by Githook User [ 01/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 update error reporting for opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4f844190d9029b7525f21fd6a0f393f0e83ceb9c

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 fix forward decl of IDL struct
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/01a34670f7218464e426893f33e89d001e0985fd

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 fix IDL for "validate" option
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3af754904b6110be391093dddee687cbdd0b3321

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 not all CRUD funcs take "collation"
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ebde61ce8f405cf0c9e5ff13a9f1b511ce0715d7

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 start generating docs from IDL
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/730ad3c1489416f65dd846e71b67d0909be7be0f

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 use IDL for insert_one/many
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2e023bf79e3e2221c34f78e2162d695644a1e234

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 generate .h and .c for "opts"
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/9dc5844c0a881142c0e97cc5df80b398b4254a43

Comment by Githook User [ 31/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2373 begin IDL for functions with opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ce87bffd1757313712c37628c67760ff1de8c3f1

Comment by Githook User [ 26/Dec/17 ]

Author:

{'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2373 generate .h and .c for "opts"
Branch: CDRIVER-2373-idl
https://github.com/mongodb/mongo-c-driver/commit/6e6d80a52e0ead481cd7b0b67fcdf2c3bbb46fbc

Comment by Githook User [ 24/Dec/17 ]

Author:

{'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2373 begin IDL for functions with opts
Branch: CDRIVER-2373-idl
https://github.com/mongodb/mongo-c-driver/commit/6030f81b9b84ddd989a688c2fc89a646631ef205

Generated at Wed Feb 07 21:15:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.