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.



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

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

Instance Method Details

#async_executorObject



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

def async_executor; end

#checkin(_) ⇒ Object



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

def checkin(_); end

#connection_classObject



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

def connection_class; end

#db_configObject



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

def db_config
  NULL_CONFIG
end

#dirties_query_cacheObject



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

def dirties_query_cache
  true
end

#remove(_) ⇒ Object



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

def remove(_); end

#schema_cacheObject



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

def schema_cache; end

#schema_reflectionObject



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

def schema_reflection
  SchemaReflection.new(nil)
end

#server_version(connection) ⇒ Object

:nodoc:



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

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