Module: Switchman::ActiveRecord::ConnectionHandler
- Defined in:
- lib/switchman/active_record/connection_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.global_schema_reflection ⇒ Object
13 14 15 |
# File 'lib/switchman/active_record/connection_handler.rb', line 13 def self.global_schema_reflection @global_schema_reflection ||= ::ActiveRecord::ConnectionAdapters::SchemaReflection.new(nil) end |
Instance Method Details
#resolve_pool_config(config, connection_name, role, shard) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/switchman/active_record/connection_handler.rb', line 6 def resolve_pool_config(config, connection_name, role, shard) ret = super # Make *all* pool configs use the same schema reflection ret.schema_reflection = ConnectionHandler.global_schema_reflection ret end |