Class: ActiveRecord::ConnectionAdapters::NullPool

Inherits:
Object
  • Object
show all
Includes:
AbstractPool
Defined in:
lib/active_record/connection_adapters/abstract/connection_pool.rb

Overview

:nodoc:

Defined Under Namespace

Classes: NullConfig

Constant Summary collapse

NULL_CONFIG =

:nodoc:

NullConfig.new

Instance Method Summary collapse

Constructor Details

#initializeNullPool

Returns a new instance of NullPool.



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

def initialize
  super()
  @mutex = Mutex.new
  @server_version = nil
end

Instance Method Details

#async_executorObject



42
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 42

def async_executor; end

#checkin(_) ⇒ Object



40
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 40

def checkin(_); end

#connection_classObject



39
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 39

def connection_class; end

#db_configObject



44
45
46
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 44

def db_config
  NULL_CONFIG
end

#dirties_query_cacheObject



48
49
50
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 48

def dirties_query_cache
  true
end

#remove(_) ⇒ Object



41
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 41

def remove(_); end

#schema_cacheObject



38
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 38

def schema_cache; end

#schema_reflectionObject



34
35
36
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 34

def schema_reflection
  SchemaReflection.new(nil)
end

#server_version(connection) ⇒ Object

:nodoc:



30
31
32
# File 'lib/active_record/connection_adapters/abstract/connection_pool.rb', line 30

def server_version(connection) # :nodoc:
  @server_version || @mutex.synchronize { @server_version ||= connection.get_database_version }
end