method

build_count_subquery?

rails latest stable - Class: ActiveRecord::Calculations

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

build_count_subquery?(operation, column_name, distinct)
private

No documentation available.

# File activerecord/lib/active_record/relation/calculations.rb, line 657
      def build_count_subquery?(operation, column_name, distinct)
        # SQLite and older MySQL does not support `COUNT DISTINCT` with `*` or
        # multiple columns, so we need to use subquery for this.
        operation == "count" &&
          (((column_name == :all || select_values.many?) && distinct) || has_limit_or_offset?)
      end