Class: StandardBatchInsert

Inherits:
Object show all
Includes:
FromHash
Defined in:
lib/dataload/batch_insert.rb

Direct Known Subclasses

OracleBatchInsert, SqlServerBatchInsert

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ar_classObject

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_sizeObject

Returns the value of attribute block_size.



3
4
5
# File 'lib/dataload/batch_insert.rb', line 3

def block_size
  @block_size
end

#rowsObject

Returns the value of attribute rows.



3
4
5
# File 'lib/dataload/batch_insert.rb', line 3

def rows
  @rows
end

#table_nameObject

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