bulk_insert 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e78f757829191018747a87be6b1c6aec0a8a140b248fab6e698b217d0125575
|
4
|
+
data.tar.gz: b3e5cce589f88d49820f06681c72c833f727c2743650e7da0a84cb9fffe40eed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa009cab807affa711ec0ac7c4618137401fa56e91651103947c444f835970e61c9a2855316bc0b46c3a669eb84b1f08ae0b211cfdac8f870f910dc203455830
|
7
|
+
data.tar.gz: d2f0a68185ebc1b788e5bb90509ab37240599b288d65ef26bc23b900545bc4766eb159757aa2b7ac441d99af5578da339ca1dfe9876ae11904f298443bdaa4c6
|
data/lib/bulk_insert/version.rb
CHANGED
@@ -353,6 +353,26 @@ class BulkInsertWorkerTest < ActiveSupport::TestCase
|
|
353
353
|
end
|
354
354
|
end
|
355
355
|
|
356
|
+
test "adapter dependent postgresql methods (no ignore, no update_duplicates)" do
|
357
|
+
connection = Testing.connection
|
358
|
+
connection.stub :adapter_name, 'PostgreSQL' do
|
359
|
+
pgsql_worker = BulkInsert::Worker.new(
|
360
|
+
connection,
|
361
|
+
Testing.table_name,
|
362
|
+
'id',
|
363
|
+
%w(greeting age happy created_at updated_at color),
|
364
|
+
500, # batch size
|
365
|
+
false, # ignore
|
366
|
+
false, # update duplicates
|
367
|
+
true # return primary keys
|
368
|
+
)
|
369
|
+
|
370
|
+
pgsql_worker.add ["Yo", 15, false, nil, nil]
|
371
|
+
|
372
|
+
assert_equal pgsql_worker.compose_insert_query, "INSERT INTO \"testings\" (\"greeting\",\"age\",\"happy\",\"created_at\",\"updated_at\",\"color\") VALUES ('Yo',15,0,NULL,NULL,'chartreuse') RETURNING id"
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
356
376
|
test "adapter dependent postgresql methods (with update_duplicates)" do
|
357
377
|
connection = Testing.connection
|
358
378
|
connection.stub :adapter_name, 'PostgreSQL' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulk_insert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-05-
|
12
|
+
date: 2020-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|