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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52e74caff0379cb38b08152605e7790afaa3404b
4
- data.tar.gz: 975229de97721db74df8ed9a93a22d5c3ec894f1
3
+ metadata.gz: 032ef372a8859f17e09c28e63d7a766c811c891f
4
+ data.tar.gz: 74a160436ffbb90fe44d8e2c51a31c0946d41796
5
5
  SHA512:
6
- metadata.gz: 217ab537834bc0d92c5fea4f8501ad0899032d8fda8ae4fcc852b9a7abe8842ee28317e4270a58ace5f2a4b3d42e7242ec8571f77206e60990984915263b501d
7
- data.tar.gz: 77a0c4fdff6b65176f0db111251df3dfa575dd7088a812ee384c36999a249b87833e80be48b0c88b6c33af9aa3b05a1693059760626d82d2e172ba2feffc18db
6
+ metadata.gz: fc5f97adee078e148f8df1c940a4d16036c704c125bbaf6d5937a2cdae578a631ef5aa1476023980709c29a3e82b8c374e5fc282a0caddcc843d21d962273a5f
7
+ data.tar.gz: ff56fcf9cd09e83f7af730a17982327ef149bf074c8515a70d2f082796b7d13bcc22d9288a3b111c4b4a50853e4c7c2922ab78f1e9042f5b3422ff832d6b22c6
@@ -3,6 +3,6 @@ require 'multi_insert/query'
3
3
 
4
4
  class ActiveRecord::Base
5
5
  def self.multi_insert(columns, values, opts = {})
6
- ::MultiInsert::Query.new(table_name, columns, values, opts)
6
+ ::MultiInsert::Query.new(self.table_name, columns, values, opts)
7
7
  end
8
8
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MultiInsert
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nax