bulk-insert-active-record 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -20
- data/README.md +1 -1
- data/bulk-insert-active-record.gemspec +1 -1
- data/lib/inserters/base.rb +1 -1
- data/lib/inserters/oracle.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1966eb98e24ef3c8912cc80c66ef459bd2b0e300
|
4
|
+
data.tar.gz: 77ff9ac1e24eb5cec32ea9497e7fee75cabad91a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ce4c63dcfd1c3a453df4b29fe087a341f24817026803cf80aaeb41af22cfcc9c2852671fff1c721cf2bd7edddcdce394ac1a6b7ac15203aa6a4580f4d32186a
|
7
|
+
data.tar.gz: 38b8e704a13a0b9494d52ba8a6214bd7da28b4a7dda27a76b8ac03ea96a9f8884b89be3a63ca323024c605fa9d4c2766c4e29708ba8d7f3210f36d60bf40d733
|
data/Gemfile.lock
CHANGED
@@ -1,38 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bulk-insert-active-record (0.0.
|
4
|
+
bulk-insert-active-record (0.0.5)
|
5
5
|
activerecord (>= 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (
|
11
|
-
activesupport (=
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
activemodel (5.0.0)
|
11
|
+
activesupport (= 5.0.0)
|
12
|
+
activerecord (5.0.0)
|
13
|
+
activemodel (= 5.0.0)
|
14
|
+
activesupport (= 5.0.0)
|
15
|
+
arel (~> 7.0)
|
16
|
+
activesupport (5.0.0)
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (~> 0.7)
|
19
|
-
json (~> 1.7, >= 1.7.7)
|
20
19
|
minitest (~> 5.1)
|
21
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
22
20
|
tzinfo (~> 1.1)
|
23
|
-
arel (
|
24
|
-
ast (2.
|
25
|
-
|
21
|
+
arel (7.0.0)
|
22
|
+
ast (2.3.0)
|
23
|
+
concurrent-ruby (1.0.2)
|
26
24
|
i18n (0.7.0)
|
27
|
-
json (1.8.3)
|
28
25
|
minitest (5.9.0)
|
29
|
-
parser (2.3.1.
|
26
|
+
parser (2.3.1.2)
|
30
27
|
ast (~> 2.2)
|
31
28
|
powerpack (0.1.1)
|
32
29
|
rainbow (2.1.0)
|
33
|
-
rake (11.
|
34
|
-
rubocop (0.
|
35
|
-
parser (>= 2.3.1.
|
30
|
+
rake (11.2.2)
|
31
|
+
rubocop (0.41.1)
|
32
|
+
parser (>= 2.3.1.1, < 3.0)
|
36
33
|
powerpack (~> 0.1)
|
37
34
|
rainbow (>= 1.99.1, < 3.0)
|
38
35
|
ruby-progressbar (~> 1.7)
|
@@ -41,7 +38,7 @@ GEM
|
|
41
38
|
thread_safe (0.3.5)
|
42
39
|
tzinfo (1.2.2)
|
43
40
|
thread_safe (~> 0.1)
|
44
|
-
unicode-display_width (1.0
|
41
|
+
unicode-display_width (1.1.0)
|
45
42
|
|
46
43
|
PLATFORMS
|
47
44
|
ruby
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ performance.
|
|
6
6
|
## Current status
|
7
7
|
|
8
8
|
This gem is currently actively in development, but because it's already useful, I've decided to publish it in its
|
9
|
-
premature state. Right now it has been manually tested with MySQL
|
9
|
+
premature state. Right now it has been manually tested with MySQL, SQL Server and Oracle via JDBC.
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'bulk-insert-active-record'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.5'
|
8
8
|
spec.author = ['Walter Horstman']
|
9
9
|
spec.email = ['walter.horstman@itonrails.com']
|
10
10
|
|
data/lib/inserters/base.rb
CHANGED
@@ -8,7 +8,7 @@ module BulkInsertActiveRecord
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute(records, column_names)
|
11
|
-
statement = 'INSERT INTO %{table_name}(%{columns_clause}) VALUES
|
11
|
+
statement = 'INSERT INTO %{table_name}(%{columns_clause}) VALUES %{values_clause}'
|
12
12
|
@connection.insert(format(statement, table_name: @quoted_table_name,
|
13
13
|
columns_clause: column_names.map do |column_name|
|
14
14
|
@connection.quote_column_name(column_name)
|
data/lib/inserters/oracle.rb
CHANGED
@@ -3,7 +3,7 @@ module BulkInsertActiveRecord
|
|
3
3
|
# Implementation specific for Oracle
|
4
4
|
class Oracle < Base
|
5
5
|
def execute(records, column_names) # override
|
6
|
-
statement = 'BEGIN INSERT INTO %{table_name}(%{columns_clause})
|
6
|
+
statement = 'BEGIN INSERT INTO %{table_name}(%{columns_clause}) (%{values_clause}); END;'
|
7
7
|
@connection.execute(format(statement, table_name: @quoted_table_name,
|
8
8
|
columns_clause: column_names.map do |column_name|
|
9
9
|
@connection.quote_column_name(column_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulk-insert-active-record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Walter Horstman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|