123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::TableAlias

Do not use. This class is for internal use only.

Class Method Summary

Binary - Inherited

Instance Attribute Summary

Instance Method Summary

Binary - Inherited

::Arel::Math - Included

#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~@

::Arel::OrderPredications - Included

::Arel::AliasPredication - Included

#as

::Arel::Predications - Included

::Arel::Expressions - Included

Node - Inherited

#and

Factory method to create an And node.

#fetch_attribute, #invert,
#not

Factory method to create a Nodes::Not node that has the recipient of the caller as a child.

#or

Factory method to create a Grouping node that has an Or node as a child.

#to_sql

FIXME: this method should go away.

::Arel::FactoryMethods - Included

Constructor Details

This class inherits a constructor from Arel::Nodes::Binary

Instance Attribute Details

#able_to_type_cast?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 26

def able_to_type_cast?
  relation.respond_to?(:able_to_type_cast?) && relation.able_to_type_cast?
end

Instance Method Details

#[](name)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 10

def [](name)
  relation.is_a?(Table) ? relation[name, self] : Attribute.new(self, name)
end

#name Also known as: #table_alias

Alias for Binary#right.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 6

alias :name :right

#relation

Alias for Binary#left.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 7

alias :relation :left

#table_alias

Alias for #name.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 8

alias :table_alias :name

#table_name

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 14

def table_name
  relation.respond_to?(:name) ? relation.name : name
end

#to_cte

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 30

def to_cte
  Arel::Nodes::Cte.new(name, relation)
end

#type_cast_for_database(attr_name, value)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 18

def type_cast_for_database(attr_name, value)
  relation.type_cast_for_database(attr_name, value)
end

#type_for_attribute(name)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/table_alias.rb', line 22

def type_for_attribute(name)
  relation.type_for_attribute(name)
end