multi_insert 0.1.3 → 0.1.4

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: 032ef372a8859f17e09c28e63d7a766c811c891f
4
- data.tar.gz: 74a160436ffbb90fe44d8e2c51a31c0946d41796
3
+ metadata.gz: fc88de09d021aaa85d16bbf4d876a69a87a4a921
4
+ data.tar.gz: 4f3dd8796f7b8e050ff23123d0708702a78385d1
5
5
  SHA512:
6
- metadata.gz: fc5f97adee078e148f8df1c940a4d16036c704c125bbaf6d5937a2cdae578a631ef5aa1476023980709c29a3e82b8c374e5fc282a0caddcc843d21d962273a5f
7
- data.tar.gz: ff56fcf9cd09e83f7af730a17982327ef149bf074c8515a70d2f082796b7d13bcc22d9288a3b111c4b4a50853e4c7c2922ab78f1e9042f5b3422ff832d6b22c6
6
+ metadata.gz: 6ce752cd597546875031f34724d5f05f7b6abb54db882773e2c00e5204c5f55509ab3532cfcdda83ae531f11cf626888dcfb9bf9ca03f431d9aea21ec8d2cde2
7
+ data.tar.gz: 8115180ddf1d1662d3eb2bda8f49cadf80f2bc89eb5af0e9eb0e6b668b6138c68fc3746455325ee61ba0148af612ff28263e6aaab28da3aae2386e425fc2e6cf
@@ -14,24 +14,24 @@ module MultiInsert
14
14
  # Format columns
15
15
  columns = columns + [:created_at, :updated_at] if options[:time]
16
16
  columns = columns.map!{|c| ar.quote_column_name(c.to_s)}
17
- columns = self.join_params(columns)
17
+ columns = join_params(columns)
18
18
 
19
19
  # Format values
20
20
  if options[:time]
21
21
  values = values.map{|v| v + [now, now]}
22
22
  end
23
- values = values.map{|v| self.join_params(v.map{|vv| ar.quote(vv.to_s)})}.join(',')
23
+ values = values.map{|v| join_params(v.map{|vv| ar.quote(vv.to_s)})}.join(',')
24
24
 
25
25
  "INSERT INTO #{table} #{columns} VALUES #{values}"
26
26
  end
27
- end
28
27
 
29
- def self.returning(columns)
30
- columns = columns.map{|c| ActiveRecord::Base.connection.quote_column_name(c.to_s)}.join(',')
31
- "RETURNING #{columns}"
32
- end
28
+ def self.returning(columns)
29
+ columns = columns.map{|c| ActiveRecord::Base.connection.quote_column_name(c.to_s)}.join(',')
30
+ "RETURNING #{columns}"
31
+ end
33
32
 
34
- def self.join_params(params)
35
- "(" + params.join(',') + ")"
33
+ def self.join_params(params)
34
+ "(" + params.join(',') + ")"
35
+ end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module MultiInsert
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_insert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nax