Method: Remi::DataSource::Postgres#connection
- Defined in:
- lib/remi/data_source/postgres.rb
#connection ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/remi/data_source/postgres.rb', line 24 def connection @connection ||= PG.connect( host: @credentials[:host] || 'localhost', port: @credentials[:port] || 5432, dbname: @credentials[:dbname], user: @credentials[:user] || `whoami`.chomp, password: @credentials[:password], sslmode: @credentials[:sslmode] || 'allow' ) end |