Flowdock
exec_queries(&block) 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.rb, line 666
      def exec_queries(&block)
        @records =
          if eager_loading?
            find_with_associations do |relation, join_dependency|
              if ActiveRecord::NullRelation === relation
                []
              else
                rows = connection.select_all(relation.arel, "SQL", relation.bound_attributes)
                join_dependency.instantiate(rows, &block)
              end.freeze
            end
          else
            klass.find_by_sql(arel, bound_attributes, &block).freeze
          end

        preload = preload_values
        preload += includes_values unless eager_loading?
        preloader = nil
        preload.each do |associations|
          preloader ||= build_preloader
          preloader.preload @records, associations
        end

        @records.each(&:readonly!) if readonly_value

        @loaded = true
        @records
      end
Register or log in to add new notes.