class method
self.construct_finder_sql
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
self.construct_finder_sql(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File activerecord/lib/active_record/base.rb, line 1623
def construct_finder_sql(options)
scope = scope(:find)
sql = "SELECT #{options[:select] || (scope && scope[:select]) || default_select(options[:joins] || (scope && scope[:joins]))} "
sql << "FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} "
add_joins!(sql, options[:joins], scope)
add_conditions!(sql, options[:conditions], scope)
add_group!(sql, options[:group], scope)
add_order!(sql, options[:order], scope)
add_limit!(sql, options, scope)
add_lock!(sql, options, scope)
sql
end
Defined in activerecord/lib/active_record/base.rb line 1623
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base