123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::DatabaseStatements::PartialQueryCollector

Class Method Summary

Instance Method Summary

Constructor Details

.newPartialQueryCollector

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb', line 518

def initialize
  @parts = []
  @binds = []
end

Instance Method Details

#<<(str)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb', line 523

def <<(str)
  @parts << str
  self
end

#add_bind(obj)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb', line 528

def add_bind(obj)
  @binds << obj
  @parts << Arel::Nodes::BindParam.new(1)
  self
end

#value

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb', line 534

def value
  [@parts, @binds]
end