activerecord-cockroachdb-adapter 6.1.0beta1 → 6.1.0.pre.beta.2

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: 5d0954fd425d90342f04c1b6559b78e398be9e523e67779476d81f925a1aa611
4
- data.tar.gz: 1f990c34784394bafa77933eb0d49965a0eac81151f2468c92a66c1bc9beb78a
3
+ metadata.gz: 856c8a5b793b12c32950311165d759ca18ae2ad2eadf28fe840f2fc3408f69af
4
+ data.tar.gz: 1826396e865d87ff66729cdad7b68f89aeec84ffc7a83cdfb9de8141661f1c09
5
5
  SHA512:
6
- metadata.gz: 3074426e81a83bb4ae2e50047c6db97dc75d9b8a822c3fd1153fb3403457bb56e7f36acb42802e5dd777c056dd0864db7dc26e875e7a644cb158f0a1c8001f3a
7
- data.tar.gz: 8ff7c637812c1b262452ca1ef6ad8308a3f620a47e3798c6ef7b93096fedb362ce52372f6c0b870af1b475a31cf83f670f4e6d65498c231f5759a475820568af
6
+ metadata.gz: 8ded85319e0d91018cef909714262f0474485f814aa0d35b0230a9e0a4adc31f66184a4203163aeef971d0fc3263631b3adb807b79263778212b742cfc243419
7
+ data.tar.gz: a730aef8f48b921d78df77f636699728ef37c6047bc28ad599aca252ea8c0967adae03a39a0b78e027e1fb4d5c7b95035b1efa53d3f4ef55b606db15dcc5621e
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 6.1.0-beta.2 - 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.1.0beta1
10
+
11
+ - Initial support for Rails 6.1.
12
+ - Support for spatial functionality.
@@ -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.1.0beta1"
7
+ spec.version = "6.1.0-beta.2"
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/oid/interval"
18
19
  require "active_record/connection_adapters/cockroachdb/arel_tosql"
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.1.0beta1
4
+ version: 6.1.0.pre.beta.2
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-02-10 00:00:00.000000000 Z
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
@@ -83,6 +84,7 @@ files:
83
84
  - lib/active_record/connection_adapters/cockroachdb/database_tasks.rb
84
85
  - lib/active_record/connection_adapters/cockroachdb/oid/interval.rb
85
86
  - lib/active_record/connection_adapters/cockroachdb/oid/spatial.rb
87
+ - lib/active_record/connection_adapters/cockroachdb/oid/type_map_initializer.rb
86
88
  - lib/active_record/connection_adapters/cockroachdb/quoting.rb
87
89
  - lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb
88
90
  - lib/active_record/connection_adapters/cockroachdb/schema_statements.rb
@@ -98,7 +100,7 @@ licenses:
98
100
  - Apache-2.0
99
101
  metadata:
100
102
  allowed_push_host: https://rubygems.org
101
- post_install_message:
103
+ post_install_message:
102
104
  rdoc_options: []
103
105
  require_paths:
104
106
  - lib
@@ -113,8 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
115
  - !ruby/object:Gem::Version
114
116
  version: 1.3.1
115
117
  requirements: []
116
- rubygems_version: 3.0.3
117
- signing_key:
118
+ rubygems_version: 3.1.4
119
+ signing_key:
118
120
  specification_version: 4
119
121
  summary: CockroachDB adapter for ActiveRecord.
120
122
  test_files: []