# class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool

### Public Class Methods

new(connection, max) click to toggle source
Calls superclass method

    # File lib/active_record/connection_adapters/postgresql_adapter.rb, line 183
    def initialize(connection, max)
      super(max)
      @connection = connection
      @counter = 0
    end

### Public Instance Methods

[]=(sql, key) click to toggle source
Calls superclass method

    # File lib/active_record/connection_adapters/postgresql_adapter.rb, line 193
    def []=(sql, key)
      super.tap { @counter += 1 }
    end

next_key() click to toggle source

    # File lib/active_record/connection_adapters/postgresql_adapter.rb, line 189
    def next_key
      "a#{@counter + 1}"
    end

### Private Instance Methods

connection_active?() click to toggle source

    # File lib/active_record/connection_adapters/postgresql_adapter.rb, line 203
    def connection_active?
      @connection.status == PG::CONNECTION_OK
    rescue PG::Error
      false
    end

dealloc(key) click to toggle source

    # File lib/active_record/connection_adapters/postgresql_adapter.rb, line 199
    def dealloc(key)
      @connection.query "DEALLOCATE #{key}" if connection_active?
    end