class Arel::TreeManager
Attributes
ast[R]
Public Class Methods
new()
click to toggle source
# File lib/arel/tree_manager.rb, line 10 def initialize @ctx = nil end
Public Instance Methods
initialize_copy(other)
click to toggle source
Calls superclass method
# File lib/arel/tree_manager.rb, line 26 def initialize_copy other super @ast = @ast.clone end
to_dot()
click to toggle source
# File lib/arel/tree_manager.rb, line 14 def to_dot collector = Arel::Collectors::PlainString.new collector = Visitors::Dot.new.accept @ast, collector collector.value end
to_sql(engine = Table.engine)
click to toggle source
# File lib/arel/tree_manager.rb, line 20 def to_sql engine = Table.engine collector = Arel::Collectors::SQLString.new collector = engine.connection.visitor.accept @ast, collector collector.value end
where(expr)
click to toggle source
# File lib/arel/tree_manager.rb, line 31 def where expr if Arel::TreeManager === expr expr = expr.ast end @ctx.wheres << expr self end