class Arel::TreeManager
Attributes
ast[R]
bind_values[RW]
engine[R]
Public Class Methods
new(engine)
click to toggle source
# File lib/arel/tree_manager.rb, line 9 def initialize engine @engine = engine @ctx = nil @bind_values = [] end
Public Instance Methods
initialize_copy(other)
click to toggle source
Calls superclass method
# File lib/arel/tree_manager.rb, line 27 def initialize_copy other super @ast = @ast.clone end
to_dot()
click to toggle source
# File lib/arel/tree_manager.rb, line 15 def to_dot Visitors::Dot.new.accept @ast end
to_sql()
click to toggle source
# File lib/arel/tree_manager.rb, line 23 def to_sql visitor.accept @ast end
visitor()
click to toggle source
# File lib/arel/tree_manager.rb, line 19 def visitor engine.connection.visitor end
where(expr)
click to toggle source
# File lib/arel/tree_manager.rb, line 32 def where expr if Arel::TreeManager === expr expr = expr.ast end @ctx.wheres << expr self end