Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1865

Support per-CRUD operation write options

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.13.0.rc1
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      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

            Assignee:
            grace.chong@mongodb.com Grace Chong (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: