Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool
- Inherits:
-
StatementPool
- Object
- StatementPool
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool
- Defined in:
- activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Overview
:nodoc:
Constant Summary
Constants inherited from StatementPool
StatementPool::DEFAULT_STATEMENT_LIMIT
Instance Method Summary collapse
-
#initialize(connection, max) ⇒ StatementPool
constructor
A new instance of StatementPool.
- #next_key ⇒ Object
Methods inherited from StatementPool
#[], #[]=, #clear, #delete, #each, #key?, #length, #reset
Methods included from Enumerable
#as_json, #compact_blank, #exclude?, #excluding, #in_order_of, #including, #index_by, #index_with, #many?, #maximum, #minimum, #pick, #pluck, #sole
Constructor Details
#initialize(connection, max) ⇒ StatementPool
Returns a new instance of StatementPool.
296 297 298 299 300 |
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 296 def initialize(connection, max) super(max) @connection = connection @counter = 0 end |
Instance Method Details
#next_key ⇒ Object
302 303 304 |
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 302 def next_key "a#{@counter += 1}" end |