Class: Arel::Externalization
- Includes:
- Recursion::BaseCase
- Defined in:
- lib/arel/algebra/relations/utilities/externalization.rb,
lib/arel/engines/sql/relations/utilities/externalization.rb
Instance Attribute Summary
Attributes inherited from Compound
Attributes included from Relation
Instance Method Summary collapse
- #attributes ⇒ Object
-
#name ⇒ Object
REMOVEME.
- #table_sql(formatter = Sql::TableReference.new(relation)) ⇒ Object
- #wheres ⇒ Object
Methods included from Recursion::BaseCase
Methods inherited from Compound
#build_query, #engine, #eql?, #hash, requires, #unoperated_rows
Methods included from Relation
#bind, #call, #christener, #compiler, #exclusion_predicate_sql, #externalizable?, #externalize, #inclusion_predicate_sql, #join?, #primary_key, #session, #to_sql
Methods included from Relation::DefaultOperations
#groupings, #havings, #inserts, #joins, #locked, #orders, #projections, #skipped, #sources, #taken
Methods included from Relation::AttributeAccessable
#[], #find_attribute_matching_attribute, #find_attribute_matching_name, #position_of
Methods included from Relation::Operable
#alias, #join, #lock, #outer_join
Methods included from Relation::Operable::Writable
Methods included from Relation::Enumerable
Instance Method Details
#attributes ⇒ Object
10 11 12 |
# File 'lib/arel/algebra/relations/utilities/externalization.rb', line 10 def attributes @attributes ||= Header.new(relation.attributes.map { |a| a.to_attribute(self) }) end |
#name ⇒ Object
REMOVEME
10 11 12 |
# File 'lib/arel/engines/sql/relations/utilities/externalization.rb', line 10 def name relation.name + '_external' end |
#table_sql(formatter = Sql::TableReference.new(relation)) ⇒ Object
5 6 7 |
# File 'lib/arel/engines/sql/relations/utilities/externalization.rb', line 5 def table_sql(formatter = Sql::TableReference.new(relation)) formatter.select relation.compiler.select_sql, self end |
#wheres ⇒ Object
6 7 8 |
# File 'lib/arel/algebra/relations/utilities/externalization.rb', line 6 def wheres [] end |