activerecord-spanner-adapter 2.2.0 → 2.3.0
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 +4 -4
- data/.github/workflows/acceptance-tests-on-emulator.yaml +7 -1
- data/.github/workflows/ci.yaml +8 -2
- data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +7 -1
- data/.github/workflows/nightly-unit-tests.yaml +7 -1
- data/.github/workflows/samples.yaml +7 -1
- data/.kokoro/trampoline_v2.sh +0 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/activerecord-spanner-adapter.gemspec +1 -1
- data/lib/active_record/connection_adapters/spanner/database_statements.rb +3 -1
- data/lib/activerecord_spanner_adapter/base.rb +2 -2
- data/lib/activerecord_spanner_adapter/version.rb +1 -1
- data/lib/arel/visitors/spanner.rb +11 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35016d190d27c935b9a004570e326d7cdc75af064f877bd619334ea967cf4d7a
|
4
|
+
data.tar.gz: 1cf91b818edc4d594fcf623f0a3218927406b47523931641fb6e844c88b578ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96dfb48e59b278093e118006e393e03b8981fd370605664830a73ad09873ead412a726a838407595fb903194e64f7b368dc940a443d774847679c316742eefc3
|
7
|
+
data.tar.gz: 5aa61e971ad3b21f9a9dee3476e7ce9fe5b52f080c2bd507e39cd2aa90719802d0ba5bcd024c3fa521feabc1e8756a249757dda5d3d432c67111ea3479d50e17
|
@@ -18,12 +18,18 @@ jobs:
|
|
18
18
|
strategy:
|
19
19
|
max-parallel: 4
|
20
20
|
matrix:
|
21
|
-
ruby: ["3.1", "3.2", "3.3"]
|
21
|
+
ruby: ["3.1", "3.2", "3.3", "3.4"]
|
22
22
|
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
|
23
23
|
# Exclude combinations that are not supported.
|
24
24
|
exclude:
|
25
25
|
- ruby: "3.1"
|
26
26
|
ar: "~> 8.0.0"
|
27
|
+
- ruby: "3.4"
|
28
|
+
ar: "~> 7.0.0"
|
29
|
+
- ruby: "3.4"
|
30
|
+
ar: "~> 7.1.0"
|
31
|
+
- ruby: "3.4"
|
32
|
+
ar: "~> 7.2.0"
|
27
33
|
env:
|
28
34
|
AR_VERSION: ${{ matrix.ar }}
|
29
35
|
steps:
|
data/.github/workflows/ci.yaml
CHANGED
@@ -10,12 +10,18 @@ jobs:
|
|
10
10
|
strategy:
|
11
11
|
max-parallel: 4
|
12
12
|
matrix:
|
13
|
-
ruby: ["3.1", "3.2", "3.3"]
|
13
|
+
ruby: ["3.1", "3.2", "3.3", "3.4"]
|
14
14
|
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
|
15
15
|
# Exclude combinations that are not supported.
|
16
16
|
exclude:
|
17
17
|
- ruby: "3.1"
|
18
18
|
ar: "~> 8.0.0"
|
19
|
+
- ruby: "3.4"
|
20
|
+
ar: "~> 7.0.0"
|
21
|
+
- ruby: "3.4"
|
22
|
+
ar: "~> 7.1.0"
|
23
|
+
- ruby: "3.4"
|
24
|
+
ar: "~> 7.2.0"
|
19
25
|
env:
|
20
26
|
AR_VERSION: ${{ matrix.ar }}
|
21
27
|
steps:
|
@@ -30,4 +36,4 @@ jobs:
|
|
30
36
|
- name: Install dependencies
|
31
37
|
run: bundle install
|
32
38
|
- name: Run tests
|
33
|
-
run: bundle exec rake test TESTOPTS="-v"
|
39
|
+
run: bundle exec rake test --trace TESTOPTS="-v"
|
@@ -18,12 +18,18 @@ jobs:
|
|
18
18
|
strategy:
|
19
19
|
max-parallel: 4
|
20
20
|
matrix:
|
21
|
-
ruby: ["3.1", "3.2", "3.3"]
|
21
|
+
ruby: ["3.1", "3.2", "3.3", "3.4"]
|
22
22
|
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
|
23
23
|
# Exclude combinations that are not supported.
|
24
24
|
exclude:
|
25
25
|
- ruby: "3.1"
|
26
26
|
ar: "~> 8.0.0"
|
27
|
+
- ruby: "3.4"
|
28
|
+
ar: "~> 7.0.0"
|
29
|
+
- ruby: "3.4"
|
30
|
+
ar: "~> 7.1.0"
|
31
|
+
- ruby: "3.4"
|
32
|
+
ar: "~> 7.2.0"
|
27
33
|
env:
|
28
34
|
AR_VERSION: ${{ matrix.ar }}
|
29
35
|
steps:
|
@@ -11,12 +11,18 @@ jobs:
|
|
11
11
|
max-parallel: 4
|
12
12
|
matrix:
|
13
13
|
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
|
14
|
-
ruby: ["3.1", "3.2", "3.3"]
|
14
|
+
ruby: ["3.1", "3.2", "3.3", "3.4"]
|
15
15
|
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
|
16
16
|
# Exclude combinations that are not supported.
|
17
17
|
exclude:
|
18
18
|
- ruby: "3.1"
|
19
19
|
ar: "~> 8.0.0"
|
20
|
+
- ruby: "3.4"
|
21
|
+
ar: "~> 7.0.0"
|
22
|
+
- ruby: "3.4"
|
23
|
+
ar: "~> 7.1.0"
|
24
|
+
- ruby: "3.4"
|
25
|
+
ar: "~> 7.2.0"
|
20
26
|
env:
|
21
27
|
AR_VERSION: ${{ matrix.ar }}
|
22
28
|
steps:
|
@@ -8,12 +8,18 @@ jobs:
|
|
8
8
|
strategy:
|
9
9
|
max-parallel: 4
|
10
10
|
matrix:
|
11
|
-
ruby: ["3.1", "3.2", "3.3"]
|
11
|
+
ruby: ["3.1", "3.2", "3.3", "3.4"]
|
12
12
|
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
|
13
13
|
# Exclude combinations that are not supported.
|
14
14
|
exclude:
|
15
15
|
- ruby: "3.1"
|
16
16
|
ar: "~> 8.0.0"
|
17
|
+
- ruby: "3.4"
|
18
|
+
ar: "~> 7.0.0"
|
19
|
+
- ruby: "3.4"
|
20
|
+
ar: "~> 7.1.0"
|
21
|
+
- ruby: "3.4"
|
22
|
+
ar: "~> 7.2.0"
|
17
23
|
env:
|
18
24
|
AR_VERSION: ${{ matrix.ar }}
|
19
25
|
steps:
|
data/.kokoro/trampoline_v2.sh
CHANGED
File without changes
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 2.3.0 (2025-05-30)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Add optimizer hint syntax to set a priority in request options ([#363](https://github.com/googleapis/ruby-spanner-activerecord/issues/363))
|
8
|
+
* support ruby 3.4 ([#359](https://github.com/googleapis/ruby-spanner-activerecord/issues/359))
|
9
|
+
|
3
10
|
### 2.2.0 (2025-04-03)
|
4
11
|
|
5
12
|
#### Features
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency "autotest-suffix", "~> 1.1"
|
32
32
|
spec.add_development_dependency "bundler", "~> 2.0"
|
33
|
-
spec.add_development_dependency "google-style", "~> 1.
|
33
|
+
spec.add_development_dependency "google-style", "~> 1.31.0"
|
34
34
|
spec.add_development_dependency "minitest", "~> 5.10"
|
35
35
|
spec.add_development_dependency "minitest-autotest", "~> 1.0"
|
36
36
|
spec.add_development_dependency "minitest-focus", "~> 1.1"
|
@@ -29,7 +29,7 @@ module ActiveRecord
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def internal_execute sql, name = "SQL", binds = [],
|
32
|
-
prepare: false, async: false, allow_retry: false # rubocop:disable Lint/UnusedMethodArgument
|
32
|
+
prepare: false, async: false, allow_retry: false # rubocop:disable Lint/UnusedMethodArgument
|
33
33
|
statement_type = sql_statement_type sql
|
34
34
|
# Call `transform` to invoke any query transformers that might have been registered.
|
35
35
|
sql = transform sql
|
@@ -406,8 +406,10 @@ module ActiveRecord
|
|
406
406
|
end
|
407
407
|
|
408
408
|
DDL_REGX = build_sql_statement_regexp(:create, :alter, :drop).freeze
|
409
|
+
private_constant :DDL_REGX
|
409
410
|
|
410
411
|
DML_REGX = build_sql_statement_regexp(:insert, :delete, :update).freeze
|
412
|
+
private_constant :DML_REGX
|
411
413
|
|
412
414
|
def sql_statement_type sql
|
413
415
|
case sql
|
@@ -21,7 +21,7 @@ module ActiveRecord
|
|
21
21
|
# Creates an object (or multiple objects) and saves it to the database. This method will use mutations instead
|
22
22
|
# of DML if there is no active transaction, or if the active transaction has been created with the option
|
23
23
|
# isolation: :buffered_mutations.
|
24
|
-
def self.create!
|
24
|
+
def self.create!(attributes = nil, &)
|
25
25
|
return super unless spanner_adapter?
|
26
26
|
return super if active_transaction?
|
27
27
|
|
@@ -30,7 +30,7 @@ module ActiveRecord
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.create
|
33
|
+
def self.create(attributes = nil, &)
|
34
34
|
return super unless spanner_adapter?
|
35
35
|
return super if active_transaction?
|
36
36
|
|
@@ -91,10 +91,17 @@ module Arel # :nodoc: all
|
|
91
91
|
StalenessHint.new min_read_timestamp: time
|
92
92
|
next
|
93
93
|
end
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
if v.start_with? "read_timestamp:"
|
95
|
+
time = Time.xmlschema v.delete_prefix("read_timestamp:")
|
96
|
+
collector.hints[:staleness] =
|
97
|
+
StalenessHint.new read_timestamp: time
|
98
|
+
next
|
99
|
+
end
|
100
|
+
next unless v.start_with? "priority:"
|
101
|
+
priority = v.delete_prefix("priority:").strip.to_sym
|
102
|
+
collector.hints[:request_options] ||=
|
103
|
+
Google::Cloud::Spanner::V1::RequestOptions.new
|
104
|
+
collector.hints[:request_options].priority = priority
|
98
105
|
end
|
99
106
|
collector
|
100
107
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-spanner-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-cloud-spanner
|
@@ -91,14 +91,14 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 1.
|
94
|
+
version: 1.31.0
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 1.
|
101
|
+
version: 1.31.0
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: minitest
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
@@ -587,7 +587,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
587
587
|
- !ruby/object:Gem::Version
|
588
588
|
version: '0'
|
589
589
|
requirements: []
|
590
|
-
rubygems_version: 3.6.
|
590
|
+
rubygems_version: 3.6.9
|
591
591
|
specification_version: 4
|
592
592
|
summary: Rails ActiveRecord connector for Google Spanner Database
|
593
593
|
test_files: []
|