aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/tree_manager.rb
blob: d2027bedfa05e49aacc4edc333b5734e3b8c1bd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Arel
  class TreeManager
    # FIXME: Remove this.
    include Arel::Relation

    def initialize engine
      @engine = engine
    end

    def to_dot
      Visitors::Dot.new.accept @head
    end

    def to_sql
      viz = Visitors::ToSql.new @engine
      viz.accept @head
    end
  end
end