Class: ActiveRecord::ConnectionAdapters::RedshiftAdapter::StatementPool
- Inherits:
 - 
      ConnectionAdapters::StatementPool
      
        
- Object
 - ConnectionAdapters::StatementPool
 - ActiveRecord::ConnectionAdapters::RedshiftAdapter::StatementPool
 
 
- Defined in:
 - lib/active_record/connection_adapters/redshift_adapter.rb
 
Overview
:nodoc:
Instance Method Summary collapse
- #[]=(sql, key) ⇒ Object
 - 
  
    
      #initialize(connection, max)  ⇒ StatementPool 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of StatementPool.
 - #next_key ⇒ Object
 
Constructor Details
#initialize(connection, max) ⇒ StatementPool
Returns a new instance of StatementPool.
      130 131 132 133 134  | 
    
      # File 'lib/active_record/connection_adapters/redshift_adapter.rb', line 130 def initialize(connection, max) super(max) @connection = connection @counter = 0 end  | 
  
Instance Method Details
#[]=(sql, key) ⇒ Object
      140 141 142  | 
    
      # File 'lib/active_record/connection_adapters/redshift_adapter.rb', line 140 def []=(sql, key) super.tap { @counter += 1 } end  | 
  
#next_key ⇒ Object
      136 137 138  | 
    
      # File 'lib/active_record/connection_adapters/redshift_adapter.rb', line 136 def next_key "a#{@counter + 1}" end  |