You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: update.rb
    path of file: ./repos/nobrainer/lib/no_brainer/criteria
    
    the code of the file until where you have to start completion: module NoBrainer::Criteria::Update
  ext
    
  def perform_update(type, args, block)
    args[0] = model.persistable_attributes(args[0]) if !args.empty? && args.first.is_a?(Hash)
    # can't use without_distinct when passed a block as the operation may be
    # performed many times, which might not be idempotent.
    clause = block ? self : without_distinct
    run { clause.without_plucking.without_ordering.to_rql.__send__(type, *args, &block) }
  end