Class: MassInsert::Utilities
- Inherits:
-
Object
- Object
- MassInsert::Utilities
- Defined in:
- lib/mass_insert/utilities.rb
Constant Summary collapse
- ADAPTERS =
{ mysql2: Adapters::Mysql2Adapter, postgresql: Adapters::PostgreSQLAdapter, sqlite3: Adapters::SQLite3Adapter, }
Class Method Summary collapse
Class Method Details
.adapter ⇒ Object
9 10 11 |
# File 'lib/mass_insert/utilities.rb', line 9 def self.adapter database_config[:adapter].to_sym end |
.adapter_class ⇒ Object
17 18 19 |
# File 'lib/mass_insert/utilities.rb', line 17 def self.adapter_class ADAPTERS[Utilities.adapter] end |
.database_config ⇒ Object
13 14 15 |
# File 'lib/mass_insert/utilities.rb', line 13 def self.database_config ActiveRecord::Base.connection.instance_values['config'] end |
.per_batch ⇒ Object
21 22 23 |
# File 'lib/mass_insert/utilities.rb', line 21 def self.per_batch 500 end |