Class: Brillo::Adapter::Postgres

Inherits:
Base
  • Object
show all
Defined in:
lib/brillo/adapter/postgres.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#dump_structure_and_migrations, #footer, #header, #initialize

Constructor Details

This class inherits a constructor from Brillo::Adapter::Base

Instance Method Details

#load_commandObject



4
5
6
7
8
# File 'lib/brillo/adapter/postgres.rb', line 4

def load_command
  host = config[:host] ? "--host #{config[:host]}" : ""
  password = config[:password] ? "-W#{config[:password]}" : ""
  "psql #{host} -U #{config[:username]} #{password} #{config[:database]}"
end