Module: ActiveRecord::ConnectionAdapters::AbstractPool

Included in:
ConnectionPool, NullPool
Defined in:
lib/active_record/connection_adapters/abstract/connection_pool.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#get_schema_cache(connection) ⇒ Object



13
14
15
16
17
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 13

def get_schema_cache(connection)
  self.schema_cache ||= SchemaCache.new(connection)
  schema_cache.connection = connection
  schema_cache
end

#lazily_set_schema_cacheObject



23
24
25
26
27
28
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 23

def lazily_set_schema_cache
  return unless ActiveRecord.lazily_load_schema_cache

  cache = SchemaCache.load_from(db_config.lazy_schema_cache_path)
  set_schema_cache(cache)
end

#set_schema_cache(cache) ⇒ Object



19
20
21
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 19

def set_schema_cache(cache)
  self.schema_cache = cache
end