Class: BiblioTech::Builders::Postgres::Import

Inherits:
Import show all
Defined in:
lib/bibliotech/builders/postgres.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Import

registry_host

Methods inherited from Database

find_class

Methods inherited from Base

adapter_registry, for, #initialize, null_adapter, register, registry, supported_adapters

Constructor Details

This class inherits a constructor from BiblioTech::Builders::Base

Instance Method Details

#go(command) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/bibliotech/builders/postgres.rb', line 28

def go(command)
  command.from('pg_restore')
  config.optional{ command.options << "-h #{config.host}" }
  config.optional{ command.env["PGPASSWORD"] = config.password }
  config.optional{ command.options << "-p #{config.port}" } #ok

  command.options << "-U #{config.username}"
  command.options << "-d #{config.database}"
  command
end