activerecord-import-vertica 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67c6f562f4c064fececcc04ea0c19b4a5417e3ea
4
- data.tar.gz: 0a5b6a344e7fabedcaf2e7fbde0aa4d7ee0280be
3
+ metadata.gz: 276cbe6449ad2d1fc8fb367831d919201339afe7
4
+ data.tar.gz: a8146edcc7e3abd1c70ddce2b0ed629f54123b94
5
5
  SHA512:
6
- metadata.gz: 3541cd0714fdd5e71bbffd6ee1aab889f40eadb92088f32354b637f413127d60d206e9b51389080199c0334d5a24ce55c470079b47085cf6ad269d365f5af6f1
7
- data.tar.gz: 5fb0fc9abcf7e3530afa2f34a159671caf66309a7943099f5115f40e684da102ddfd053e120a2219b0e048454b5edcbd80f4b18d74b31e2e92a02bc8f9412341
6
+ metadata.gz: ca75775eac4609cb5e38dda2038ed5eb63d33d4986fe388926e8f333402a7e51aa2156d38dfcc397983a65e2f01b49c8e29957ee65e004251e52aebd2b896789
7
+ data.tar.gz: 2a2679d64dd060fb2223d5a4685a2029f50a0af1db03496d8a442eab9961ab04493df85f581dc4aa9c398a634cf5be5313216711756db9c0aff6c038f445187c
@@ -3,3 +3,13 @@ require "activerecord-import/adapters/vertica5_adapter"
3
3
  class ActiveRecord::ConnectionAdapters::VerticaAdapter
4
4
  include ActiveRecord::Import::Vertica5Adapter
5
5
  end
6
+
7
+ class ActiveRecord::Base
8
+ def self.import(*args)
9
+ if args.flatten.first.is_a?(::ActiveRecord::Base)
10
+ bulk_insert_records(*args)
11
+ else
12
+ bulk_insert(*args)
13
+ end
14
+ end
15
+ end
@@ -3,3 +3,13 @@ require "activerecord-import/adapters/vertica6_adapter"
3
3
  class ActiveRecord::ConnectionAdapters::VerticaAdapter
4
4
  include ActiveRecord::Import::Vertica6Adapter
5
5
  end
6
+
7
+ class ActiveRecord::Base
8
+ def self.import(*args)
9
+ if args.flatten.first.is_a?(::ActiveRecord::Base)
10
+ bulk_insert_records(*args)
11
+ else
12
+ bulk_insert(*args)
13
+ end
14
+ end
15
+ end
@@ -3,3 +3,13 @@ require "activerecord-import/adapters/vertica7_adapter"
3
3
  class ActiveRecord::ConnectionAdapters::VerticaAdapter
4
4
  include ActiveRecord::Import::Vertica7Adapter
5
5
  end
6
+
7
+ class ActiveRecord::Base
8
+ def self.import(*args)
9
+ if args.flatten.first.is_a?(::ActiveRecord::Base)
10
+ bulk_insert_records(*args)
11
+ else
12
+ bulk_insert(*args)
13
+ end
14
+ end
15
+ end
@@ -8,22 +8,3 @@ 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
@@ -1,7 +1,7 @@
1
1
  module Activerecord
2
2
  module Import
3
3
  module Vertica
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-import-vertica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Stien