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

How can one pass a write concern to #delete_many ?

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.1.0
    • Component/s: Public API
    • Labels:
      None

      Description

      In the 1.8 series of the driver, one could set an explicit write concern when deleting many documents:

      col.remove({:_id => { '$in' => ids}}, :w => 1)
      

      In the process of upgrading to the new driver, I've converted the query to:

      col.find({:_id => { '$in' => pids}}).delete_many
      

      but this is not 100% equivalent since I haven't set the write concern.

      Since #delete_many does not take any arguments, how can I explicitly set the write concern?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              emily.stolfo Emily Stolfo
              Reporter:
              agis Agis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: