Module: ActiveRecord::Extensions::ConnectionAdapters::SQLiteAdapter

Includes:
Import::ImportSupport
Defined in:
lib/ar-extensions/import/sqlite.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from Import::ImportSupport

#supports_import?

Instance Method Details

#insert_many(sql, values, *args) ⇒ Object

:nodoc:



8
9
10
11
12
13
14
15
16
# File 'lib/ar-extensions/import/sqlite.rb', line 8

def insert_many( sql, values, *args ) # :nodoc:
  sql2insert = []
  values.each do |value|
    sql2insert << "#{sql} #{value};"
  end
  
  raw_connection.transaction { |db| db.execute_batch(sql2insert.join("\n")) }
  number_of_rows_inserted = sql2insert.size
end

#post_sql_statements(table_name, options) ⇒ Object



4
5
6
# File 'lib/ar-extensions/import/sqlite.rb', line 4

def post_sql_statements( table_name, options )
  []
end