def update(change, flags = nil)
      with_retry(cluster) do
        cluster.with_primary do |node|
          node.update(
            operation.database,
            operation.collection,
            operation.selector["$query"] || operation.selector,
            change,
            write_concern,
            flags: flags
          )
        end
      end
    end
def update(change, flags = nil)
      with_retry(cluster) do
        cluster.with_primary do |node|
          node.update(
            operation.database,
            operation.collection,
            operation.selector["$query"] || operation.selector,
            change,
            write_concern,
            flags: flags
          )
        end
      end
    end
Update a single document matching the query's selector.

 @example Update the first matching document.
   db[:people].find(_id: 1).update(name: "John")

 @param [ Hash ] change The changes to make to the document
 @param [ Array ] flags An array of operation flags. Valid values are:
   +:multi+ and +:upsert+

 @return [ Hash, nil ] If in safe mode the last error result.

 @since 1.0.0