method

limited_ids_for

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: ActiveRecord::FinderMethods
limited_ids_for(relation) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 427
      def limited_ids_for(relation)
        values = @klass.connection.columns_for_distinct(
          connection.visitor.compile(table[primary_key]),
          relation.order_values
        )

        relation = relation.except(:select).select(values).distinct!

        id_rows = skip_query_cache_if_necessary { @klass.connection.select_rows(relation.arel, "SQL") }
        id_rows.map(&:last)
      end
Register or log in to add new notes.