Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool

Inherits:
StatementPool show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb

Overview

:nodoc:

Constant Summary

Constants inherited from StatementPool

StatementPool::DEFAULT_STATEMENT_LIMIT

Instance Method Summary collapse

Methods inherited from StatementPool

#[], #[]=, #clear, #delete, #each, #key?, #length

Methods included from Enumerable

#as_json, #compact_blank, #exclude?, #excluding, #in_order_of, #including, #index_by, #index_with, #many?, #maximum, #minimum, #pick, #pluck, #sole, #sum

Constructor Details

#initialize(connection, max) ⇒ StatementPool

Returns a new instance of StatementPool.



257
258
259
260
261
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb', line 257

def initialize(connection, max)
  super(max)
  @connection = connection
  @counter = 0
end

Instance Method Details

#next_keyObject



263
264
265
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb', line 263

def next_key
  "a#{@counter += 1}"
end