activerecord-cockroachdb-adapter 6.0.0beta3 → 6.0.0.pre.beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2eca72798ef552202f48b26be2502ef9a9517cf5bd8cda03a0888f67607d6be0
|
|
4
|
+
data.tar.gz: e6ca3dc5323251c3e8b77b3e7ea9553cde259557a035fd48f94413e47583ecfe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03d0c5cbd633dec23e4092fac1bd678f583ebb0b15688eaf54f9b334890a3edf8f78382424f9549036c179f3c66c6d7276f05f99d92030a19f5895be4ac87d2b
|
|
7
|
+
data.tar.gz: 5d1d43cfe25affb953cc423b60ea7d0eef0f10c6bb33133b06d1e5d18aed30f3b2c8a7d0ba259148a2d91d2060cecc1848a81e6b6b25c3e2bb02b42eb5cb0038
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 6.0.0-beta.4 - 2021-03-06
|
|
4
|
+
|
|
5
|
+
- Improved connection performance by refactoring an introspection
|
|
6
|
+
that loads types.
|
|
7
|
+
- Changed version numbers to semver.
|
|
8
|
+
|
|
9
|
+
## 6.0.0beta3
|
|
10
|
+
|
|
11
|
+
- Added support for spatial features.
|
|
12
|
+
|
|
13
|
+
## 6.0.0beta2
|
|
14
|
+
|
|
15
|
+
- Updated transaction retry logic to work with Rails 6.
|
|
16
|
+
|
|
17
|
+
## 6.0.0beta1
|
|
18
|
+
|
|
19
|
+
- Initial support for Rails 6.
|
|
@@ -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 = "6.0.
|
|
7
|
+
spec.version = "6.0.0-beta.4"
|
|
8
8
|
spec.licenses = ["Apache-2.0"]
|
|
9
9
|
spec.authors = ["Cockroach Labs"]
|
|
10
10
|
spec.email = ["cockroach-db@googlegroups.com"]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module ActiveRecord
|
|
2
|
+
module ConnectionAdapters
|
|
3
|
+
module CockroachDB
|
|
4
|
+
module OID
|
|
5
|
+
module TypeMapInitializer
|
|
6
|
+
# override
|
|
7
|
+
# Replaces the query with a faster version that doesn't rely on the
|
|
8
|
+
# use of 'array_in(cstring,oid,integer)'::regprocedure.
|
|
9
|
+
def query_conditions_for_initial_load
|
|
10
|
+
known_type_names = @store.keys.map { |n| "'#{n}'" }
|
|
11
|
+
known_type_types = %w('r' 'e' 'd')
|
|
12
|
+
<<~SQL % [known_type_names.join(", "), known_type_types.join(", ")]
|
|
13
|
+
WHERE
|
|
14
|
+
t.typname IN (%s)
|
|
15
|
+
OR t.typtype IN (%s)
|
|
16
|
+
OR (t.typarray = 0 AND t.typcategory='A')
|
|
17
|
+
OR t.typelem != 0
|
|
18
|
+
SQL
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
PostgreSQL::OID::TypeMapInitializer.prepend(TypeMapInitializer)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -13,6 +13,7 @@ require "active_record/connection_adapters/cockroachdb/attribute_methods"
|
|
|
13
13
|
require "active_record/connection_adapters/cockroachdb/column"
|
|
14
14
|
require "active_record/connection_adapters/cockroachdb/spatial_column_info"
|
|
15
15
|
require "active_record/connection_adapters/cockroachdb/setup"
|
|
16
|
+
require "active_record/connection_adapters/cockroachdb/oid/type_map_initializer"
|
|
16
17
|
require "active_record/connection_adapters/cockroachdb/oid/spatial"
|
|
17
18
|
require "active_record/connection_adapters/cockroachdb/arel_tosql"
|
|
18
19
|
|
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: 6.0.
|
|
4
|
+
version: 6.0.0.pre.beta.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cockroach Labs
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -62,6 +62,7 @@ extra_rdoc_files: []
|
|
|
62
62
|
files:
|
|
63
63
|
- ".gitignore"
|
|
64
64
|
- ".gitmodules"
|
|
65
|
+
- CHANGELOG.md
|
|
65
66
|
- CONTRIBUTING.md
|
|
66
67
|
- Gemfile
|
|
67
68
|
- LICENSE
|
|
@@ -82,6 +83,7 @@ files:
|
|
|
82
83
|
- lib/active_record/connection_adapters/cockroachdb/database_statements.rb
|
|
83
84
|
- lib/active_record/connection_adapters/cockroachdb/database_tasks.rb
|
|
84
85
|
- lib/active_record/connection_adapters/cockroachdb/oid/spatial.rb
|
|
86
|
+
- lib/active_record/connection_adapters/cockroachdb/oid/type_map_initializer.rb
|
|
85
87
|
- lib/active_record/connection_adapters/cockroachdb/quoting.rb
|
|
86
88
|
- lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb
|
|
87
89
|
- lib/active_record/connection_adapters/cockroachdb/schema_statements.rb
|
|
@@ -97,7 +99,7 @@ licenses:
|
|
|
97
99
|
- Apache-2.0
|
|
98
100
|
metadata:
|
|
99
101
|
allowed_push_host: https://rubygems.org
|
|
100
|
-
post_install_message:
|
|
102
|
+
post_install_message:
|
|
101
103
|
rdoc_options: []
|
|
102
104
|
require_paths:
|
|
103
105
|
- lib
|
|
@@ -112,8 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
112
114
|
- !ruby/object:Gem::Version
|
|
113
115
|
version: 1.3.1
|
|
114
116
|
requirements: []
|
|
115
|
-
rubygems_version: 3.
|
|
116
|
-
signing_key:
|
|
117
|
+
rubygems_version: 3.1.4
|
|
118
|
+
signing_key:
|
|
117
119
|
specification_version: 4
|
|
118
120
|
summary: CockroachDB adapter for ActiveRecord.
|
|
119
121
|
test_files: []
|