Module: ActiveRecord::Import
- Defined in:
- lib/activerecord-import/import.rb,
lib/activerecord-import/base.rb
Overview
:nodoc:
Defined Under Namespace
Modules: AbstractAdapter, ConnectionAdapters, ImportSupport, MysqlAdapter, OnDuplicateKeyUpdateSupport, PostgreSQLAdapter, SqlanywhereAdapter, SqlanywhereJdbcIn4systemsAdapter, Sqlite3Adapter Classes: MissingColumnError, Result
Constant Summary collapse
- AdapterPath =
File.join File.(File.dirname(__FILE__)), "/active_record/adapters"
Class Method Summary collapse
-
.load_from_connection_pool(connection_pool) ⇒ Object
Loads the import functionality for the passed in ActiveRecord connection.
-
.require_adapter(adapter) ⇒ Object
Loads the import functionality for a specific database adapter.
Class Method Details
.load_from_connection_pool(connection_pool) ⇒ Object
Loads the import functionality for the passed in ActiveRecord connection
15 16 17 |
# File 'lib/activerecord-import/base.rb', line 15 def self.load_from_connection_pool(connection_pool) require_adapter connection_pool.spec.config[:adapter] end |
.require_adapter(adapter) ⇒ Object
Loads the import functionality for a specific database adapter
9 10 11 12 |
# File 'lib/activerecord-import/base.rb', line 9 def self.require_adapter(adapter) require File.join(AdapterPath,"/abstract_adapter") require File.join(AdapterPath,"/#{adapter}_adapter") end |