module Turboquery::Connection::PsqlEnv

Public Class Methods

host(config) click to toggle source
# File lib/turboquery/connection.rb, line 109
def self.host(config)
  ENV['PGHOST']     = config[:host]
end
password(config) click to toggle source
# File lib/turboquery/connection.rb, line 117
def self.password(config)
  ENV['PGPASSWORD'] = config[:password].to_s
end
port(config) click to toggle source
# File lib/turboquery/connection.rb, line 113
def self.port(config)
  ENV['PGPORT']     = config[:port].to_s
end
set(config) click to toggle source
# File lib/turboquery/connection.rb, line 102
def self.set(config)
  host(config)     if config[:host]
  port(config)     if config[:port]
  password(config) if config[:password]
  username(config) if config[:username]
end
username(config) click to toggle source
# File lib/turboquery/connection.rb, line 121
def self.username(config)
  ENV['PGUSER']     = config[:username].to_s
end