class RedshiftCsv::Connection
Attributes
config[R]
Public Class Methods
new()
click to toggle source
# File lib/redshift_csv/connection.rb, line 5 def initialize @config = { dbname: RedshiftCsv.config.dbname, user: RedshiftCsv.config.user, password: RedshiftCsv.config.password, host: RedshiftCsv.config.host, sslmode: 'require', port: 5439 } end
Public Instance Methods
run(sql)
click to toggle source
# File lib/redshift_csv/connection.rb, line 16 def run(sql) connection.exec(sql) end
Private Instance Methods
connection()
click to toggle source
# File lib/redshift_csv/connection.rb, line 22 def connection PGconn.connect(@config) end