activerecord-cockroachdb-adapter 7.1.1 → 7.2.1

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +6 -3
  3. data/.gitignore +1 -0
  4. data/CHANGELOG.md +7 -1
  5. data/CONTRIBUTING.md +39 -90
  6. data/Gemfile +4 -4
  7. data/LICENSE +1 -2
  8. data/README.md +7 -5
  9. data/activerecord-cockroachdb-adapter.gemspec +2 -2
  10. data/bin/console +7 -5
  11. data/bin/console_schemas/default.rb +2 -0
  12. data/lib/active_record/connection_adapters/cockroachdb/arel_tosql.rb +14 -0
  13. data/lib/active_record/connection_adapters/cockroachdb/attribute_methods.rb +16 -0
  14. data/lib/active_record/connection_adapters/cockroachdb/column.rb +16 -0
  15. data/lib/active_record/connection_adapters/cockroachdb/column_methods.rb +14 -0
  16. data/lib/active_record/connection_adapters/cockroachdb/database_statements.rb +27 -3
  17. data/lib/active_record/connection_adapters/cockroachdb/database_tasks.rb +18 -2
  18. data/lib/active_record/connection_adapters/cockroachdb/oid/date_time.rb +14 -0
  19. data/lib/active_record/connection_adapters/cockroachdb/oid/interval.rb +16 -0
  20. data/lib/active_record/connection_adapters/cockroachdb/oid/spatial.rb +14 -0
  21. data/lib/active_record/connection_adapters/cockroachdb/quoting.rb +16 -0
  22. data/lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb +99 -9
  23. data/lib/active_record/connection_adapters/cockroachdb/schema_creation.rb +14 -1
  24. data/lib/active_record/connection_adapters/cockroachdb/schema_dumper.rb +14 -1
  25. data/lib/active_record/connection_adapters/cockroachdb/schema_statements.rb +125 -25
  26. data/lib/active_record/connection_adapters/cockroachdb/setup.rb +14 -0
  27. data/lib/active_record/connection_adapters/cockroachdb/spatial_column_info.rb +16 -0
  28. data/lib/active_record/connection_adapters/cockroachdb/table_definition.rb +14 -0
  29. data/lib/active_record/connection_adapters/cockroachdb/transaction_manager.rb +35 -0
  30. data/lib/active_record/connection_adapters/cockroachdb/type.rb +16 -0
  31. data/lib/active_record/connection_adapters/cockroachdb_adapter.rb +56 -55
  32. data/lib/active_record/migration/cockroachdb/compatibility.rb +16 -0
  33. data/lib/active_record/relation/query_methods_ext.rb +14 -0
  34. data/lib/activerecord-cockroachdb-adapter.rb +21 -0
  35. data/lib/arel/nodes/join_source_ext.rb +16 -0
  36. data/lib/version.rb +15 -1
  37. metadata +7 -8
  38. data/.ruby-version +0 -1
@@ -1,3 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 The Cockroach Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  require "active_record/migration"
2
18
  require "active_record/migration/compatibility"
3
19
 
@@ -1,5 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Copyright 2024 The Cockroach Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
3
17
  module ActiveRecord
4
18
  class Relation
5
19
  module QueryMethodsExt
@@ -1,3 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 The Cockroach Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  if defined?(Rails::Railtie)
2
18
  module ActiveRecord
3
19
  module ConnectionAdapters
@@ -9,3 +25,8 @@ if defined?(Rails::Railtie)
9
25
  end
10
26
  end
11
27
  end
28
+
29
+ require "active_record"
30
+ require "active_record/connection_adapters"
31
+
32
+ ActiveRecord::ConnectionAdapters.register "cockroachdb", "ActiveRecord::ConnectionAdapters::CockroachDBAdapter", "active_record/connection_adapters/cockroachdb_adapter"
@@ -1,3 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 The Cockroach Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
1
17
  module Arel
2
18
  module Nodes
3
19
  module JoinSourceExt
data/lib/version.rb CHANGED
@@ -1,5 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Copyright 2024 The Cockroach Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
3
17
  module ActiveRecord
4
- COCKROACH_DB_ADAPTER_VERSION = "7.1.1"
18
+ COCKROACH_DB_ADAPTER_VERSION = "7.2.1"
5
19
  end
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: 7.1.1
4
+ version: 7.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cockroach Labs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-04 00:00:00.000000000 Z
11
+ date: 2025-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 7.1.0
19
+ version: 7.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 7.1.0
26
+ version: 7.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.2'
33
+ version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.2'
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rgeo-activerecord
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +79,6 @@ files:
79
79
  - ".github/workflows/docker.yml"
80
80
  - ".gitignore"
81
81
  - ".gitmodules"
82
- - ".ruby-version"
83
82
  - CHANGELOG.md
84
83
  - CONTRIBUTING.md
85
84
  - Gemfile
@@ -143,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
142
  - !ruby/object:Gem::Version
144
143
  version: '0'
145
144
  requirements: []
146
- rubygems_version: 3.4.9
145
+ rubygems_version: 3.5.23
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: CockroachDB adapter for ActiveRecord.
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.2.3