11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/active_record/connection_adapters/redshift_adapter.rb', line 11
def redshift_connection(config)
conn_params = config.symbolize_keys
conn_params.delete_if { |_, v| v.nil? }
conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
conn_params[:dbname] = conn_params.delete(:database) if conn_params[:database]
valid_conn_param_keys = PGconn.conndefaults_hash.keys + [:requiressl]
conn_params.slice!(*valid_conn_param_keys)
ActiveRecord::ConnectionAdapters::RedshiftAdapter.new(nil, logger, conn_params, config)
end
|