-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
After https://jira.mongodb.org/browse/RUBY-1860 it is relatively easy to add per-operation write concern support as well as other write options. Most if not all of the operations already take an options hash, and they just need to be adjusted to take a write concern out of options prior to defaulting to session/collection/tx etc., plus tests and docs.
Operations that need to be checked:
- insert_one
- insert_many
- update_one
- update_many
- replace_one
- delete_one
- delete_many
- find_one_and_update
- find_one_and_replace
- find_one_and_delete
- bulk_write
Options to support:
- bypass_document_validation
- max_time_ms
- upsert
- write_concern
- session
Some of the operations (specifically the find_* ones) appear to already support all options.
As part of this ticket, tests should be added or existing tests should be identified for all listed methods & options.
Rendered API documentation: https://api.mongodb.com/ruby/current/Mongo/Collection.html
The tutorial documentation will need to be updated with the supported options, e.g. for delete: https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-crud-operations/#delete-options