123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ExplainRegistry

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: activerecord/lib/active_record/explain_registry.rb

Overview

This is a thread locals registry for EXPLAIN. For example

ActiveRecord::ExplainRegistry.queries

returns the collected queries local to the current thread.

Class Method Summary

Instance Attribute Summary

Constructor Details

.newExplainRegistry

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 24

def initialize
  reset
end

Class Method Details

.instance (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 16

def instance
  ActiveSupport::IsolatedExecutionState[:active_record_explain_registry] ||= new
end

Instance Attribute Details

#collect (rw)

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 13

delegate :reset, :collect, :collect=, :collect?, :queries, to: :instance

#collect?Boolean (rw)

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 28

delegate :reset, :collect, :collect=, :collect?, :queries, to: :instance

#queries (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 13

delegate :reset, :collect, :collect=, :collect?, :queries, to: :instance

#reset (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/explain_registry.rb', line 32

delegate :reset, :collect, :collect=, :collect?, :queries, to: :instance