Module: ActiveRecord::ConnectionHandling
- Included in:
- DB2Query::Base
- Defined in:
- lib/active_record/connection_adapters/db2_query_adapter.rb
Instance Method Summary collapse
Instance Method Details
#db2_query_connection(config) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/active_record/connection_adapters/db2_query_adapter.rb', line 9 def db2_query_connection(config) conn_type = (config.keys & DB2Query::CONNECTION_TYPES).first if conn_type.nil? raise ArgumentError, "No data source name (:dsn) or connection string (:conn_str) provided." end connector = DB2Query::ODBCConnector.new(conn_type, config) ConnectionAdapters::DB2QueryConnection.new(connector, config) end |