[CDRIVER-2207] Introduce generic mongoc_client_command_with_opts() function Created: 10/Jul/17  Updated: 28/Oct/23  Resolved: 04/Nov/17

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

Type: New Feature Priority: Major - P3
Reporter: Jeremy Mikola 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-2231 Some functions not wrapped in extern "C" Closed
is depended on by CDRIVER-2331 New "with_opts" functions to accept s... Closed
is depended on by PHPC-834 Add Read, ReadWrite, and Write comman... Closed
Related
related to CDRIVER-2408 Fix documentation for command_with_op... Closed
related to CDRIVER-2372 Deprecate mongoc_collection_command Closed
is related to CDRIVER-1527 Add mongoc_client_[read|write|read_wr... Closed
Epic Link: Cdriver MongoDB 3.6 Support

 Description   

As discussed with jesse, this would be implemented in the style of mongoc_client_read_write_command_with_opts() (and friends) but only support a server hint and collation options by default. There would be no logic for injecting client defaults for read and write concern, which would make this suitable for basic commands such as ping.

It would also serve as the model for a generic command runner for driver sessions, since the APIs for mongoc_client_command() and mongoc_client_command_simple() should be retired.



 Comments   
Comment by Githook User [ 17/Nov/17 ]

Author:

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

Message: CDRIVER-2207 old command APIs are superseded
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/5c0ed324bc85f4a1c1fcf285c6fe975600d190ee

Comment by Githook User [ 17/Nov/17 ]

Author:

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

Message: Revert "CDRIVER-2207 deprecate mongoc_database_command"

This reverts commit f98224425e0ae7f40896f42978e5c89b07ef8ab8.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a02ce83a7e3a0e8ff28193afb370cd5db6f23431

Comment by Githook User [ 17/Nov/17 ]

Author:

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

Message: Revert "CDRIVER-2207 deprecate mongoc_client_command"

This reverts commit e784642c4f5470bd50f585fbf9668b33787b76cf.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0f34ecdc57a9d4c37792b0bbb7e6e8d35751065f

Comment by Githook User [ 04/Nov/17 ]

Author:

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

Message: CDRIVER-2207 deprecate mongoc_database_command
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f98224425e0ae7f40896f42978e5c89b07ef8ab8

Comment by Githook User [ 04/Nov/17 ]

Author:

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

Message: CDRIVER-2207 test db_command_with_opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e495d249f47c438b63ee1a041ee7ac6cb36c7a21

Comment by A. Jesse Jiryu Davis [ 31/Oct/17 ]

Still have to deprecate mongoc_database_command.

Comment by Githook User [ 28/Oct/17 ]

Author:

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

Message: CDRIVER-2207 deprecate mongoc_client_command
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e784642c4f5470bd50f585fbf9668b33787b76cf

Comment by Githook User [ 28/Oct/17 ]

Author:

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

Message: CDRIVER-2207 mongoc_client_command_with_opts

Generic command function that takes arbitrary opts. Required for using
sessions with a command that does not apply any read concern, write
concern, or read preference from the mongoc_client_t.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f2d3db31be425d047a7814357786bc235df6d5d6

Comment by A. Jesse Jiryu Davis [ 04/Oct/17 ]

When we do this, let's finally mark mongoc_client_command deprecated. Consider deprecating mongoc_client_command_simple too.

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