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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c1738f3565a4700e34dfe07e7a2e098f4ab386b
4
- data.tar.gz: 7d25684fecb7dab48f5aae411c70704bdd57b162
3
+ metadata.gz: 4df8f85ed8a7a4e328845032b044c2dca3167d3a
4
+ data.tar.gz: 331311a7ab27b33d725f242d6a6af8a6eaae7275
5
5
  SHA512:
6
- metadata.gz: d80094973356a6050dc32d3140a1793a1831e3e789b3dc7eff6da3041d885271cd639666d705e04f032846e142e6315f5474d4a6204ab44b527b4602b234e994
7
- data.tar.gz: f4b75bc774a3d4dcbec95e9a99f754df15d8f9b4f37437a033effe0a007ad3cb95b41f6fafe8ee3ee9b84b2d274ec4659ec96d2a27a5eca1af18217e2cc1c232
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 = ActiveRecord::Base.connection.quote_column_name(column.to_s)
41
- "ON CONFLICT (#{column})"
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
 
@@ -1,4 +1,4 @@
1
1
  module MultiInsert
2
2
  # The version number for MultiInsert.
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
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.2
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-03-15 00:00:00.000000000 Z
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.10
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.