method

visit_Arel_Nodes_NotIn

rails latest stable - Class: Arel::Visitors::ToSql
visit_Arel_Nodes_NotIn(o, collector)
private

No documentation available.

# File activerecord/lib/arel/visitors/to_sql.rb, line 600
        def visit_Arel_Nodes_NotIn(o, collector)
          collector.preparable = false
          attr, values = o.left, o.right

          if Array === values
            unless values.empty?
              values.delete_if { |value| unboundable?(value) }
            end

            return collector << "1=1" if values.empty?
          end

          visit(attr, collector) << " NOT IN ("
          visit(values, collector) << ")"
        end