Class: Arel::Visitors::ToSql
- Defined in:
- activerecord/lib/arel/visitors/to_sql.rb
Direct Known Subclasses
Instance Method Summary collapse
- #compile(node, collector = Arel::Collectors::SQLString.new) ⇒ Object
-
#initialize(connection) ⇒ ToSql
constructor
A new instance of ToSql.
Methods inherited from Visitor
Constructor Details
#initialize(connection) ⇒ ToSql
Returns a new instance of ToSql.
12 13 14 15 |
# File 'activerecord/lib/arel/visitors/to_sql.rb', line 12 def initialize(connection) super() @connection = connection end |
Instance Method Details
#compile(node, collector = Arel::Collectors::SQLString.new) ⇒ Object
17 18 19 |
# File 'activerecord/lib/arel/visitors/to_sql.rb', line 17 def compile(node, collector = Arel::Collectors::SQLString.new) accept(node, collector).value end |