Class: ActiveRecord::DatabaseConfigurations::DatabaseConfig
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | activerecord/lib/active_record/database_configurations/database_config.rb |
Overview
Base.configurations will return either a HashConfig
or UrlConfig
respectively. It will never return a DatabaseConfig
object, as this is the parent class for the types of database configuration objects.
Class Method Summary
- .new(env_name, name) ⇒ DatabaseConfig constructor
Instance Attribute Summary
- #_database=(database) writeonly
- #env_name readonly
- #for_current_env? ⇒ Boolean readonly
- #name readonly
- #replica? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(env_name, name) ⇒ DatabaseConfig
Instance Attribute Details
#_database=(database) (writeonly)
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 32
def _database=(database) raise NotImplementedError end
#env_name (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 9
attr_reader :env_name, :name
#for_current_env? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 80
def for_current_env? env_name == ActiveRecord::ConnectionHandling::DEFAULT_ENV.call end
#name (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 9
attr_reader :env_name, :name
#replica? ⇒ Boolean
(readonly)
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 72
def replica? raise NotImplementedError end
Instance Method Details
#adapter
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 36
def adapter raise NotImplementedError end
#adapter_class_method
[ GitHub ]# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 20
def adapter_class_method "#{adapter}_adapter_class" end
#adapter_method
[ GitHub ]# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 16
def adapter_method "#{adapter}_connection" end
#checkout_timeout
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 60
def checkout_timeout raise NotImplementedError end
#database
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 28
def database raise NotImplementedError end
#host
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 24
def host raise NotImplementedError end
#idle_timeout
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 68
def idle_timeout raise NotImplementedError end
#max_queue
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 52
def max_queue raise NotImplementedError end
#max_threads
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 48
def max_threads raise NotImplementedError end
#migrations_paths
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 76
def migrations_paths raise NotImplementedError end
#min_threads
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 44
def min_threads raise NotImplementedError end
#pool
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 40
def pool raise NotImplementedError end
#query_cache
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 56
def query_cache raise NotImplementedError end
#reaping_frequency
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 64
def reaping_frequency raise NotImplementedError end
#schema_cache_path
# File 'activerecord/lib/active_record/database_configurations/database_config.rb', line 84
def schema_cache_path raise NotImplementedError end