activerecord-jdbcvertica-adapter 0.0.6 → 0.0.7

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: 3763fb0885067df8427a8ebb62615187c6d77376
4
- data.tar.gz: ec1f313ef961d6f323333a80e974a7064be4c580
3
+ metadata.gz: d8318f964be5c0fda875c96fe3c5136e02d0ff73
4
+ data.tar.gz: a9ab0afc7b2d5b5e67d6f9a80362949128c21994
5
5
  SHA512:
6
- metadata.gz: 3d108bfa54433ee4398b27115d4e1168755d9a5e2accbc84bd4bd92ba016f6548e0fc894424ecab96b9a5f3384fd9880bb4ca693eeec00b84eeaf1bfb7533b4d
7
- data.tar.gz: da086fe08adbd715065a118b88c7e0e00c22b32d54f0f1721973d64736df6edcf5e13de002d0ba3cca18f38e32ca5e5b17284629a3a51348eccfd6d1d57ec727
6
+ metadata.gz: 190ff0e13bbb386942cac0d7d1f20ab723c6554de401da9f8f7677a12195a8f5b05446de9973a222aa002ab571e464e1389e410e1f01da0d61fecff010300c73
7
+ data.tar.gz: cf0b1dacef7b49c9894c51ca33e7237df99c8cbcac3ad9c3ab7e88f74d00f0f032530c9d8d8a25042d449469d5ebf668327e50c774e6a9949045b31b217d11d7
@@ -1,7 +1,7 @@
1
1
  module Activerecord
2
2
  module Jdbcvertica
3
3
  module Adapter
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
6
6
  end
7
7
  end
@@ -3,6 +3,18 @@ require 'arjdbc/vertica/column'
3
3
  # Load a mapping for the "text" type that will actually work
4
4
  ::ActiveRecord::ConnectionAdapters::JdbcTypeConverter::AR_TO_JDBC_TYPES[:text] << lambda { |r| r['type_name'] =~ /varchar$/i }
5
5
 
6
+ # Override sequence_name to work without setting explicitly in models
7
+ module ::ActiveRecord
8
+ class Base
9
+ def self.sequence_name
10
+ "#{self.table_name}_#{self.primary_key || 'id'}_seq"
11
+ end
12
+ end
13
+ end
14
+
15
+ ##
16
+ # Adapter
17
+ #
6
18
  module ::ArJdbc
7
19
  module Vertica
8
20
  ADAPTER_NAME = 'Vertica'.freeze
@@ -45,6 +45,16 @@ describe ::FullObject do
45
45
  specify { subject.must_respond_to(:boolean) }
46
46
  end
47
47
 
48
+ describe "#create with id" do
49
+ it "sets the id if given on create" do
50
+ subject.id = 123_456
51
+ subject.string = "string"
52
+ subject.save
53
+
54
+ FullObject.find(123_456).must_equal(subject)
55
+ end
56
+ end
57
+
48
58
  describe "#delete" do
49
59
  it "deletes a persisted record" do
50
60
  subject.string = "string"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbcvertica-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt