Class: ActiveRecord::ConnectionAdapters::Mysql2ProxyAdapter

Inherits:
Mysql2Adapter
  • Object
show all
Includes:
ActiveRecordProxyAdapters::Hijackable
Defined in:
lib/active_record/connection_adapters/mysql2_proxy_adapter.rb

Overview

This adapter is a proxy to the original Mysql2Adapter, allowing the use of the ActiveRecordProxyAdapters::PrimaryReplicaProxy.

Constant Summary collapse

ADAPTER_NAME =
"Mysql2Proxy"

Instance Method Summary collapse

Constructor Details

#initializeMysql2ProxyAdapter

Returns a new instance of Mysql2ProxyAdapter.



20
21
22
23
24
# File 'lib/active_record/connection_adapters/mysql2_proxy_adapter.rb', line 20

def initialize(...)
  @proxy = ActiveRecordProxyAdapters::Mysql2Proxy.new(self)

  super
end