Sha256: 2fb484c30fbb86b70f2f23de7b37ba82b7a43c059f7abeab3748f83cbc930cd9

Contents?: true

Size: 559 Bytes

Versions: 40

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  # This is a thread locals registry for Active Record. For example:
  #
  #   ActiveRecord::RuntimeRegistry.sql_runtime
  #
  # returns the connection handler local to the current unit of execution (either thread of fiber).
  module RuntimeRegistry # :nodoc:
    extend self

    def sql_runtime
      ActiveSupport::IsolatedExecutionState[:active_record_sql_runtime]
    end

    def sql_runtime=(runtime)
      ActiveSupport::IsolatedExecutionState[:active_record_sql_runtime] = runtime
    end
  end
end

Version data entries

40 entries across 38 versions & 5 rubygems

Version Path
activerecord-7.0.8.7 lib/active_record/runtime_registry.rb
activerecord-7.0.8.6 lib/active_record/runtime_registry.rb
activerecord-7.0.8.5 lib/active_record/runtime_registry.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8.4/lib/active_record/runtime_registry.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/runtime_registry.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/runtime_registry.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activerecord-7.0.5.1/lib/active_record/runtime_registry.rb
activerecord-7.0.8.4 lib/active_record/runtime_registry.rb
activerecord-7.0.8.1 lib/active_record/runtime_registry.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activerecord-7.0.2.3/lib/active_record/runtime_registry.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/runtime_registry.rb
activerecord-7.0.8 lib/active_record/runtime_registry.rb
activerecord-7.0.7.2 lib/active_record/runtime_registry.rb
activerecord-7.0.7.1 lib/active_record/runtime_registry.rb
activerecord-7.0.7 lib/active_record/runtime_registry.rb
activerecord-7.0.6 lib/active_record/runtime_registry.rb
activerecord-7.0.5.1 lib/active_record/runtime_registry.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/active_record/runtime_registry.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.2.3/lib/active_record/runtime_registry.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/runtime_registry.rb