multi_insert 0.1.2 → 0.1.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/hooks/active_record.rb +1 -1
- data/lib/multi_insert/query_builder.rb +2 -2
- data/lib/multi_insert/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 032ef372a8859f17e09c28e63d7a766c811c891f
|
4
|
+
data.tar.gz: 74a160436ffbb90fe44d8e2c51a31c0946d41796
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc5f97adee078e148f8df1c940a4d16036c704c125bbaf6d5937a2cdae578a631ef5aa1476023980709c29a3e82b8c374e5fc282a0caddcc843d21d962273a5f
|
7
|
+
data.tar.gz: ff56fcf9cd09e83f7af730a17982327ef149bf074c8515a70d2f082796b7d13bcc22d9288a3b111c4b4a50853e4c7c2922ab78f1e9042f5b3422ff832d6b22c6
|
@@ -14,13 +14,13 @@ 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 = join_params(columns)
|
17
|
+
columns = self.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| join_params(v.map{|vv| ar.quote(vv.to_s)})}.join(',')
|
23
|
+
values = values.map{|v| self.join_params(v.map{|vv| ar.quote(vv.to_s)})}.join(',')
|
24
24
|
|
25
25
|
"INSERT INTO #{table} #{columns} VALUES #{values}"
|
26
26
|
end
|
data/lib/multi_insert/version.rb
CHANGED