123456789_123456789_123456789_123456789_123456789_

Class: Arel::TreeManager

Do not use. This class is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: activerecord/lib/arel/tree_manager.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#ast (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/tree_manager.rb', line 45

attr_reader :ast

Instance Method Details

#initialize_copy(other)

[ GitHub ]

  
# File 'activerecord/lib/arel/tree_manager.rb', line 60

def initialize_copy(other)
  super
  @ast = @ast.clone
end

#to_dot

[ GitHub ]

  
# File 'activerecord/lib/arel/tree_manager.rb', line 47

def to_dot
  collector = Arel::Collectors::PlainString.new
  collector = Visitors::Dot.new.accept @ast, collector
  collector.value
end

#to_sql(engine = Table.engine)

[ GitHub ]

  
# File 'activerecord/lib/arel/tree_manager.rb', line 53

def to_sql(engine = Table.engine)
  collector = Arel::Collectors::SQLString.new
  engine.with_connection do |connection|
    connection.visitor.accept(@ast, collector).value
  end
end