Module: Avm::Instances::Base::AutoValues::Database

Defined in:
lib/avm/instances/base/auto_values/database.rb

Constant Summary collapse

LOCAL_ADDRESS =
'127.0.0.1'
LOCAL_ADDRESSES =
[LOCAL_ADDRESS, '::1', 'localhost'].freeze
DEFAULT_EXTRA =
''
DEFAULT_HOSTNAME =
LOCAL_ADDRESS
DEFAULT_LIMIT =
5
DEFAULT_PORTS =
{
  'postgresql' => 5432,
  'mysql' => 3306,
  'oracle' => 1521,
  'sqlserver' => 1433
}.freeze
DEFAULT_SYSTEM =
'postgresql'
DEFAULT_TIMEOUT =
5000

Instance Method Summary collapse

Instance Method Details

#auto_database_nameObject



36
37
38
39
# File 'lib/avm/instances/base/auto_values/database.rb', line 36

def auto_database_name
  inherited_entry_value(::Avm::Instances::EntryKeys::DATABASE_ID,
                        ::Avm::Instances::EntryKeys::DATABASE_NAME) || id
end

#auto_database_portObject



41
42
43
# File 'lib/avm/instances/base/auto_values/database.rb', line 41

def auto_database_port
  database_auto_common('port') || database_port_by_system
end