Class: ActiveRecord::DatabaseConfigurations::DatabaseConfig
- Inherits:
-
Object
- Object
- ActiveRecord::DatabaseConfigurations::DatabaseConfig
- Defined in:
- lib/active_record/database_configurations/database_config.rb
Overview
ActiveRecord::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.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#env_name ⇒ Object
readonly
:nodoc:.
-
#name ⇒ Object
readonly
:nodoc:.
-
#owner_name ⇒ Object
Returns the value of attribute owner_name.
Instance Method Summary collapse
- #_database=(database) ⇒ Object
- #adapter ⇒ Object
- #adapter_method ⇒ Object
- #checkout_timeout ⇒ Object
- #database ⇒ Object
- #for_current_env? ⇒ Boolean
- #host ⇒ Object
- #idle_timeout ⇒ Object
-
#initialize(env_name, name) ⇒ DatabaseConfig
constructor
A new instance of DatabaseConfig.
- #max_queue ⇒ Object
- #max_threads ⇒ Object
- #migrations_paths ⇒ Object
- #min_threads ⇒ Object
- #pool ⇒ Object
- #reaping_frequency ⇒ Object
- #replica? ⇒ Boolean
- #schema_cache_path ⇒ Object
Constructor Details
#initialize(env_name, name) ⇒ DatabaseConfig
Returns a new instance of DatabaseConfig.
13 14 15 16 |
# File 'lib/active_record/database_configurations/database_config.rb', line 13 def initialize(env_name, name) @env_name = env_name @name = name end |
Instance Attribute Details
#env_name ⇒ Object (readonly)
:nodoc:
9 10 11 |
# File 'lib/active_record/database_configurations/database_config.rb', line 9 def env_name @env_name end |
#name ⇒ Object (readonly)
:nodoc:
9 10 11 |
# File 'lib/active_record/database_configurations/database_config.rb', line 9 def name @name end |
#owner_name ⇒ Object
Returns the value of attribute owner_name.
11 12 13 |
# File 'lib/active_record/database_configurations/database_config.rb', line 11 def owner_name @owner_name end |
Instance Method Details
#_database=(database) ⇒ Object
30 31 32 |
# File 'lib/active_record/database_configurations/database_config.rb', line 30 def _database=(database) raise NotImplementedError end |
#adapter ⇒ Object
34 35 36 |
# File 'lib/active_record/database_configurations/database_config.rb', line 34 def adapter raise NotImplementedError end |
#adapter_method ⇒ Object
18 19 20 |
# File 'lib/active_record/database_configurations/database_config.rb', line 18 def adapter_method "#{adapter}_connection" end |
#checkout_timeout ⇒ Object
54 55 56 |
# File 'lib/active_record/database_configurations/database_config.rb', line 54 def checkout_timeout raise NotImplementedError end |
#database ⇒ Object
26 27 28 |
# File 'lib/active_record/database_configurations/database_config.rb', line 26 def database raise NotImplementedError end |
#for_current_env? ⇒ Boolean
74 75 76 |
# File 'lib/active_record/database_configurations/database_config.rb', line 74 def for_current_env? env_name == ActiveRecord::ConnectionHandling::DEFAULT_ENV.call end |
#host ⇒ Object
22 23 24 |
# File 'lib/active_record/database_configurations/database_config.rb', line 22 def host raise NotImplementedError end |
#idle_timeout ⇒ Object
62 63 64 |
# File 'lib/active_record/database_configurations/database_config.rb', line 62 def idle_timeout raise NotImplementedError end |
#max_queue ⇒ Object
50 51 52 |
# File 'lib/active_record/database_configurations/database_config.rb', line 50 def max_queue raise NotImplementedError end |
#max_threads ⇒ Object
46 47 48 |
# File 'lib/active_record/database_configurations/database_config.rb', line 46 def max_threads raise NotImplementedError end |
#migrations_paths ⇒ Object
70 71 72 |
# File 'lib/active_record/database_configurations/database_config.rb', line 70 def migrations_paths raise NotImplementedError end |
#min_threads ⇒ Object
42 43 44 |
# File 'lib/active_record/database_configurations/database_config.rb', line 42 def min_threads raise NotImplementedError end |
#pool ⇒ Object
38 39 40 |
# File 'lib/active_record/database_configurations/database_config.rb', line 38 def pool raise NotImplementedError end |
#reaping_frequency ⇒ Object
58 59 60 |
# File 'lib/active_record/database_configurations/database_config.rb', line 58 def reaping_frequency raise NotImplementedError end |
#replica? ⇒ Boolean
66 67 68 |
# File 'lib/active_record/database_configurations/database_config.rb', line 66 def replica? raise NotImplementedError end |
#schema_cache_path ⇒ Object
78 79 80 |
# File 'lib/active_record/database_configurations/database_config.rb', line 78 def schema_cache_path raise NotImplementedError end |