method

visit_Arel_Nodes_UpdateStatement

rails latest stable - Class: Arel::Visitors::Oracle12

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

visit_Arel_Nodes_UpdateStatement(o, collector)
private

No documentation available.

# File activerecord/lib/arel/visitors/oracle12.rb, line 43
        def visit_Arel_Nodes_UpdateStatement(o, collector)
          # Oracle does not allow ORDER BY/LIMIT in UPDATEs.
          if o.orders.any? && o.limit.nil?
            # However, there is no harm in silently eating the ORDER BY clause if no LIMIT has been provided,
            # otherwise let the user deal with the error
            o = o.dup
            o.orders = []
          end

          super
        end