Skip to content

Commit 89e56b4

Browse files
committed
Introducing adapter name for custom methods according to the db type
1 parent ad5d243 commit 89e56b4

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.ruby-gemset

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bulk-insert

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-2.2.4

Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
bulk_insert (1.3.0)
4+
bulk_insert (1.4.0)
55
activerecord (>= 4.1.0)
66

77
GEM
@@ -111,4 +111,4 @@ DEPENDENCIES
111111
sqlite3
112112

113113
BUNDLED WITH
114-
1.12.5
114+
1.14.4

lib/bulk_insert/worker.rb

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class Worker
77
def initialize(connection, table_name, column_names, set_size=500, ignore=false)
88
@connection = connection
99
@set_size = set_size
10+
11+
@adapter_name = @connection.adapter_name
1012
# INSERT IGNORE only fails inserts with duplicate keys or unallowed nulls not the whole set of inserts
1113
@ignore = ignore ? "IGNORE" : nil
1214

0 commit comments

Comments
 (0)