instance method subquery_for

Ruby on Rails 4.2.9

Since v4.0.13 Last seen in v5.2.8.1

Available in: v4.0.13 v4.1.16 v4.2.9 v5.2.8.1

Signature

subquery_for(key, select)

Returns a subquery for the given key using the join information.

Parameters

key req
select req
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 348
        def subquery_for(key, select)
          subselect = select.clone
          subselect.projections = [key]
          subselect
        end

Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 348 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements

Type at least 2 characters to search.

↑↓ navigate · open · esc close