Class: StandardBatchInsert
- Includes:
- FromHash
- Defined in:
- lib/dataload/batch_insert.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ar_class ⇒ Object
Returns the value of attribute ar_class.
-
#block_size ⇒ Object
Returns the value of attribute block_size.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
Instance Attribute Details
#ar_class ⇒ Object
Returns the value of attribute ar_class.
3 4 5 |
# File 'lib/dataload/batch_insert.rb', line 3 def ar_class @ar_class end |
#block_size ⇒ Object
Returns the value of attribute block_size.
3 4 5 |
# File 'lib/dataload/batch_insert.rb', line 3 def block_size @block_size end |
#rows ⇒ Object
Returns the value of attribute rows.
3 4 5 |
# File 'lib/dataload/batch_insert.rb', line 3 def rows @rows end |
#table_name ⇒ Object
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/dataload/batch_insert.rb', line 3 def table_name @table_name end |
Instance Method Details
#insert! ⇒ Object
14 15 16 |
# File 'lib/dataload/batch_insert.rb', line 14 def insert! ActiveRecord::Base.connection.execute(insert_sql) end |