activerecord-cockroachdb-adapter 0.1.5 → 0.2.0

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: b6fb41a73e2d9ae7c9fb88f2094d14dc7b018a94
4
- data.tar.gz: 5fb0b0933595b1a631b3318941b4f47b79a5b854
3
+ metadata.gz: 2950a2695b83c0a3bd4bcebe4f5264a6254e67de
4
+ data.tar.gz: a28c9f714105f375e0bb3775ba4a425899655189
5
5
  SHA512:
6
- metadata.gz: 255858d824d22098be889a190b25454222868ee021da95ae639bd75d8e131c27ecd62a71d5f0b414ebcf414ad621daef709b1a79dc75f64683c943ceb9cb8829
7
- data.tar.gz: 6b5aff467669c95beeced14051c17361f01e14f042f6d54c4edd2e094d4cc6c3a73bb3a80918e0b27752873300c0367f4ef4e76bd5020fc379b45d90599084f0
6
+ metadata.gz: c7727300dc620bb69673a7df6e9c178c035371fda98eb6ff09ac8d647f74a0ba1322035fefee30aff2847e11bcccd834c82f73868f2c4b319d89c1d5f5c1d1ef
7
+ data.tar.gz: 33c65c50ff8a76ba5a6c322c53550ce8764cad2b94fc5f4661d1cfd043666da25ccac8e9229149adbbef24c1bf73a257b6b7ea36e94d00b779668c1c9c018205
data/README.md CHANGED
@@ -1,23 +1,19 @@
1
1
  # ActiveRecord CockroachDB Adapter
2
2
 
3
- CockroachDB adapter for ActiveRecord 4 and 5. This is a lightweight extension of the PostgreSQL adapter that establishes compatibility with [CockroachDB](https://github.com/cockroachdb/cockroach).
3
+ CockroachDB adapter for ActiveRecord 5. This is a lightweight extension of the PostgreSQL adapter that establishes compatibility with [CockroachDB](https://github.com/cockroachdb/cockroach).
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your project's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'activerecord-cockroachdb-adapter', '~> 0.2.2'
10
+ gem 'activerecord-cockroachdb-adapter', '~> 0.1.0'
11
11
  ```
12
12
 
13
- If you're using Rails 4.x, use the `0.1.x` versions of this gem.
14
-
15
13
  In `database.yml`, use the following adapter setting:
16
14
 
17
15
  ```
18
16
  development:
19
17
  adapter: cockroachdb
20
18
  port: 26257
21
- host: <hostname>
22
- user: <username>
23
19
  ```
@@ -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 = "activerecord-cockroachdb-adapter"
7
- spec.version = "0.1.5"
7
+ spec.version = "0.2.0"
8
8
  spec.licenses = ["Apache-2.0"]
9
9
  spec.authors = ["Cockroach Labs"]
10
10
  spec.email = ["cockroach-db@googlegroups.com"]
@@ -13,8 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.description = "Allows the use of CockroachDB as a backend for ActiveRecord and Rails apps."
14
14
  spec.homepage = "https://github.com/cockroachdb/activerecord-cockroachdb-adapter"
15
15
 
16
- spec.add_dependency "activerecord", "~> 4.2"
17
- spec.add_dependency "pg", "0.20"
16
+ spec.add_dependency "activerecord", "~> 5.1", ">= 5.1.1"
18
17
 
19
18
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
20
19
  # to allow pushing to a single host or delete this section to allow pushing to any host.
@@ -12,13 +12,12 @@ module ActiveRecord
12
12
  conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
13
13
  conn_params[:dbname] = conn_params.delete(:database) if conn_params[:database]
14
14
 
15
- # Forward only valid config params to PG::Connection.connect.
16
- valid_conn_param_keys = PG::Connection.conndefaults_hash.keys + [:requiressl]
15
+ # Forward only valid config params to PGconn.connect.
16
+ valid_conn_param_keys = PGconn.conndefaults_hash.keys + [:requiressl]
17
17
  conn_params.slice!(*valid_conn_param_keys)
18
18
 
19
- # The postgres drivers don't allow the creation of an unconnected
20
- # PG::Connection object, so just pass a nil connection object for the
21
- # time being.
19
+ # The postgres drivers don't allow the creation of an unconnected PGconn object,
20
+ # so just pass a nil connection object for the time being.
22
21
  ConnectionAdapters::CockroachDBAdapter.new(nil, logger, conn_params, config)
23
22
  end
24
23
  end
@@ -33,30 +32,6 @@ class ActiveRecord::ConnectionAdapters::CockroachDBAdapter < ActiveRecord::Conne
33
32
  # to use the same original `Utils` module.
34
33
  Utils = ActiveRecord::ConnectionAdapters::PostgreSQL::Utils
35
34
 
36
- def supports_json?
37
- false
38
- end
39
-
40
- def supports_ddl_transactions?
41
- false
42
- end
43
-
44
- def supports_extensions?
45
- false
46
- end
47
-
48
- def supports_ranges?
49
- false
50
- end
51
-
52
- def supports_materialized_views?
53
- false
54
- end
55
-
56
- def supports_pg_crypto_uuid?
57
- false
58
- end
59
-
60
35
  def indexes(table_name, name = nil) # :nodoc:
61
36
  # The PostgreSQL adapter uses a correlated subquery in the following query,
62
37
  # which CockroachDB does not yet support. That portion of the query fetches
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-cockroachdb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cockroach Labs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '5.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.1.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '4.2'
27
- - !ruby/object:Gem::Dependency
28
- name: pg
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: '0.20'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
29
+ version: '5.1'
30
+ - - ">="
39
31
  - !ruby/object:Gem::Version
40
- version: '0.20'
32
+ version: 5.1.1
41
33
  - !ruby/object:Gem::Dependency
42
34
  name: bundler
43
35
  requirement: !ruby/object:Gem::Requirement
@@ -121,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
113
  version: '0'
122
114
  requirements: []
123
115
  rubyforge_project:
124
- rubygems_version: 2.6.10
116
+ rubygems_version: 2.6.11
125
117
  signing_key:
126
118
  specification_version: 4
127
119
  summary: CockroachDB adapter for ActiveRecord.