method

visit_Arel_Nodes_NotIn

visit_Arel_Nodes_NotIn(o, collector)
private

No documentation available.

# File activerecord/lib/arel/visitors/to_sql.rb, line 547
        def visit_Arel_Nodes_NotIn(o, collector)
          unless Array === o.right
            return collect_not_in_clause(o.left, o.right, collector)
          end

          unless o.right.empty?
            o.right.delete_if { |value| unboundable?(value) }
          end

          return collector << "1=1" if o.right.empty?

          in_clause_length = @connection.in_clause_length

          if !in_clause_length || o.right.length <= in_clause_length
            collect_not_in_clause(o.left, o.right, collector)
          else
            o.right.each_slice(in_clause_length).each_with_index do |right, i|
              collector << " AND " unless i == 0
              collect_not_in_clause(o.left, right, collector)
            end
            collector
          end
        end