[CDRIVER-2227] "Commands with opts" tutorial Created: 01/Aug/17  Updated: 28/Oct/23  Resolved: 14/Nov/17

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.9.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:
Related
related to CDRIVER-2408 Fix documentation for command_with_op... Closed
related to CDRIVER-2409 bypassDocumentValidation is not a wri... Closed
related to CDRIVER-2213 Add write concern option to find_and_... Closed

 Description   

All the "command_with_opts" functions say:

See :symbol:`mongoc_client_read_command_with_opts` for example usage.

It would be nice if that example was moved into a slightly more thorough "commands with opts" tutorial, that included a table of what "read", "write", and "read_write" mean for read preference and read/write concern, also discuss collation, and also include that example code. Link there from all the "opts" parameter lines in the "command_with_opts" pages.



 Comments   
Comment by A. Jesse Jiryu Davis [ 14/Nov/17 ]

Good catch kevin.albertson, the C Driver hasn't used aggregate's batchSize for getMore commands in quite some time, if ever: CDRIVER-2371.

Comment by Githook User [ 14/Nov/17 ]

Author:

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

Message: CDRIVER-2227 document "opts" fields
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3085ff26d79dd78f894d9e7834ea163dce024eb6

Comment by Kevin Albertson [ 22/Sep/17 ]

Also confusing is the options on mongoc_collection_aggregate. Passing a batchSize in the opts will only set the batch size in the initial aggregate command, not the subsequent getMore's. This seems to be intentional from the code, since there is a check in mongoc_collection_aggregate.c which will explicitly exclude copying over the batch size to the cursor options. We should keep this ticket open until we (1) figure out if that is the expected behavior and (2) document this and the other options.

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