Class: ActiveRecord::ConnectionAdapters::DatabaseStatements::PartialQueryCollector
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::DatabaseStatements::PartialQueryCollector
- Defined in:
- lib/active_record/connection_adapters/abstract/database_statements.rb
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind(obj) ⇒ Object
-
#initialize ⇒ PartialQueryCollector
constructor
A new instance of PartialQueryCollector.
- #value ⇒ Object
Constructor Details
#initialize ⇒ PartialQueryCollector
Returns a new instance of PartialQueryCollector.
518 519 520 521 |
# File 'lib/active_record/connection_adapters/abstract/database_statements.rb', line 518 def initialize @parts = [] @binds = [] end |
Instance Method Details
#<<(str) ⇒ Object
523 524 525 526 |
# File 'lib/active_record/connection_adapters/abstract/database_statements.rb', line 523 def <<(str) @parts << str self end |
#add_bind(obj) ⇒ Object
528 529 530 531 532 |
# File '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 ⇒ Object
534 535 536 |
# File 'lib/active_record/connection_adapters/abstract/database_statements.rb', line 534 def value [@parts, @binds] end |