Skip to content

Commit

Permalink
make sure @ignore is always initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Feb 11, 2017
1 parent 3d94481 commit f0663bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bulk_insert/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(connection, table_name, column_names, set_size=500, ignore=false)
@connection = connection
@set_size = set_size
# INSERT IGNORE only fails inserts with duplicate keys or unallowed nulls not the whole set of inserts
@ignore = "IGNORE" if ignore
@ignore = ignore ? "IGNORE" : nil

columns = connection.columns(table_name)
column_map = columns.inject({}) { |h, c| h.update(c.name => c) }
Expand Down

0 comments on commit f0663bf

Please sign in to comment.