Class: Arel::Visitors::ToSql
- Defined in:
- lib/arel/visitors/to_sql.rb
Direct Known Subclasses
IBM_DB, Informix, MSSQL, MySQL, Oracle, OrderClauses, PostgreSQL, SQLite, WhereSql
Instance Method Summary collapse
- #accept(object) ⇒ Object
-
#initialize(pool) ⇒ ToSql
constructor
A new instance of ToSql.
Constructor Details
#initialize(pool) ⇒ ToSql
Returns a new instance of ToSql.
7 8 9 10 11 12 |
# File 'lib/arel/visitors/to_sql.rb', line 7 def initialize pool @pool = pool @connection = nil @quoted_tables = {} @quoted_columns = {} end |
Instance Method Details
#accept(object) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/arel/visitors/to_sql.rb', line 14 def accept object self.last_column = nil @pool.with_connection do |conn| @connection = conn super end end |