multi_insert 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/multi_insert/query_builder.rb +3 -2
- data/lib/multi_insert/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4df8f85ed8a7a4e328845032b044c2dca3167d3a
|
4
|
+
data.tar.gz: 331311a7ab27b33d725f242d6a6af8a6eaae7275
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da1424dca17cf5c9763e99cc3e999cf6bc01dca3591c0732918541e7ec37521dabc459324841fe9d30f80e947c10f7eda2a30a3d346c8a5d104d3a7dacb6cfc
|
7
|
+
data.tar.gz: 475df10470b5572d49aad3fe3b3f5cd9d1868960c54fa478b632eaa07b1b5f8bf21f56f00b33c6329e615bd7d4a50f3486ec890194967666090bcd5005567076
|
@@ -37,8 +37,9 @@ module MultiInsert
|
|
37
37
|
if column.nil?
|
38
38
|
"ON CONFLICT"
|
39
39
|
else
|
40
|
-
column =
|
41
|
-
|
40
|
+
column = [column] unless column.kind_of?(Array)
|
41
|
+
columns = column.map{|c| ActiveRecord::Base.connection.quote_column_name(c.to_s)}.join(',')
|
42
|
+
"ON CONFLICT (#{columns})"
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
data/lib/multi_insert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_insert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nax
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.6.
|
101
|
+
rubygems_version: 2.6.12
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Simple additions to write efficient insert queries.
|