Class: Arel::Visitors::ToSql

Inherits:
Visitor show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/visitors/to_sql.rb

Direct Known Subclasses

MySQL, PostgreSQL, SQLite

Instance Method Summary collapse

Methods inherited from Visitor

#accept

Constructor Details

#initialize(connection) ⇒ ToSql

Returns a new instance of ToSql.



12
13
14
15
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/visitors/to_sql.rb', line 17

def compile(node, collector = Arel::Collectors::SQLString.new)
  accept(node, collector).value
end