activerecord-import-vertica 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activerecord/import/vertica/version.rb +1 -1
- data/lib/activerecord/import/vertica.rb +19 -0
- 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: 67c6f562f4c064fececcc04ea0c19b4a5417e3ea
|
4
|
+
data.tar.gz: 0a5b6a344e7fabedcaf2e7fbde0aa4d7ee0280be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3541cd0714fdd5e71bbffd6ee1aab889f40eadb92088f32354b637f413127d60d206e9b51389080199c0334d5a24ce55c470079b47085cf6ad269d365f5af6f1
|
7
|
+
data.tar.gz: 5fb0fc9abcf7e3530afa2f34a159671caf66309a7943099f5115f40e684da102ddfd053e120a2219b0e048454b5edcbd80f4b18d74b31e2e92a02bc8f9412341
|
@@ -8,3 +8,22 @@ module Activerecord
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
12
|
+
# AR import loads itself inside of an activesupport load hook,
|
13
|
+
# so we have to force load the code now so that we can patch the
|
14
|
+
# import method.
|
15
|
+
module ActiveRecord
|
16
|
+
module Import
|
17
|
+
end
|
18
|
+
end
|
19
|
+
require "activerecord-import/import"
|
20
|
+
|
21
|
+
class ActiveRecord::Base
|
22
|
+
def self.import(*args)
|
23
|
+
if args.flatten.first.is_a?(::ActiveRecord::Base)
|
24
|
+
bulk_insert_records(*args)
|
25
|
+
else
|
26
|
+
bulk_insert(*args)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-import-vertica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-import
|