google-cloud-spanner 2.11.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -4
- data/lib/google/cloud/spanner/admin/database.rb +3 -0
- data/lib/google/cloud/spanner/admin/instance.rb +3 -0
- data/lib/google/cloud/spanner/convert.rb +4 -1
- data/lib/google/cloud/spanner/service.rb +6 -1
- data/lib/google/cloud/spanner/version.rb +1 -1
- data/lib/google/cloud/spanner.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a321700a7d94660455576fcea922432fc6cdb89405948c01a38916fb003f006c
|
4
|
+
data.tar.gz: 0230c7724cec00e9c3de6485a790dbb9d25c8f2f20a037292ff96b1821f98d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c2b11bef0a1627d8efeac0ff9056796cb6098d5e3529366a6841abb069e5b6e9bea7f1298b8b3f58c9daa92ac78a149264d675c9664874ef09bce5676a50511
|
7
|
+
data.tar.gz: 2f4389315cab1b06e7dafff52b5a4c2aa36fdfd030c5d0d4d684dee6649e6e52327090078dbfe09701455b9138aa47d39ccfc4c95f214ac084ccda2746cbb0db
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,32 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 2.13.0 / 2022-04-01
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* add spangres support ([#17661](https://www.github.com/googleapis/google-cloud-ruby/issues/17661))
|
8
|
+
* add pg_numeric and tests
|
9
|
+
* skip test for emulator
|
10
|
+
* add rubocop for acceptance
|
11
|
+
|
12
|
+
### 2.12.1 / 2022-02-16
|
13
|
+
|
14
|
+
#### Bug Fixes
|
15
|
+
|
16
|
+
* pass quota_project_id from credentials
|
17
|
+
|
18
|
+
### 2.12.0 / 2022-01-11
|
19
|
+
|
20
|
+
No significant changes.
|
21
|
+
|
3
22
|
### 2.11.0 / 2021-12-10
|
4
23
|
|
5
24
|
#### Features
|
6
25
|
|
7
|
-
* add admin instance wrapper
|
8
|
-
* Updated benchwrapper and proto for spanner.
|
9
|
-
* use gRPC clients for instance/database management
|
10
|
-
* wrapper to create generated admin database client.
|
26
|
+
* add admin instance wrapper.
|
27
|
+
* Updated benchwrapper and proto for spanner.
|
28
|
+
* use gRPC clients for instance/database management.
|
29
|
+
* wrapper to create generated admin database client.
|
11
30
|
|
12
31
|
### 2.10.1 / 2021-11-09
|
13
32
|
|
@@ -117,8 +117,11 @@ module Google
|
|
117
117
|
project_id = project_id.to_s # Always cast to a string
|
118
118
|
raise ArgumentError, "project_id is missing" if project_id.empty?
|
119
119
|
|
120
|
+
configure.quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
121
|
+
|
120
122
|
Admin::Database::V1::DatabaseAdmin::Client.new do |config|
|
121
123
|
config.credentials = channel endpoint, credentials
|
124
|
+
config.quota_project = configure.quota_project
|
122
125
|
config.timeout = timeout if timeout
|
123
126
|
config.endpoint = endpoint if endpoint
|
124
127
|
config.lib_name = lib_name_with_prefix lib_name, lib_version
|
@@ -117,8 +117,11 @@ module Google
|
|
117
117
|
project_id = project_id.to_s # Always cast to a string
|
118
118
|
raise ArgumentError, "project_id is missing" if project_id.empty?
|
119
119
|
|
120
|
+
configure.quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
121
|
+
|
120
122
|
Admin::Instance::V1::InstanceAdmin::Client.new do |config|
|
121
123
|
config.credentials = channel endpoint, credentials
|
124
|
+
config.quota_project = configure.quota_project
|
122
125
|
config.timeout = timeout if timeout
|
123
126
|
config.endpoint = endpoint if endpoint
|
124
127
|
config.lib_name = lib_name_with_prefix lib_name, lib_version
|
@@ -174,11 +174,14 @@ module Google
|
|
174
174
|
def grpc_type_for_field field
|
175
175
|
return field.to_grpc_type if field.respond_to? :to_grpc_type
|
176
176
|
|
177
|
-
|
177
|
+
case field
|
178
|
+
when Array
|
178
179
|
V1::Type.new(
|
179
180
|
code: :ARRAY,
|
180
181
|
array_element_type: grpc_type_for_field(field.first)
|
181
182
|
)
|
183
|
+
when :PG_NUMERIC
|
184
|
+
V1::Type.new(code: :NUMERIC, type_annotation: :PG_NUMERIC)
|
182
185
|
else
|
183
186
|
V1::Type.new(code: field)
|
184
187
|
end
|
@@ -34,13 +34,15 @@ module Google
|
|
34
34
|
attr_accessor :host
|
35
35
|
attr_accessor :lib_name
|
36
36
|
attr_accessor :lib_version
|
37
|
+
attr_accessor :quota_project
|
37
38
|
|
38
39
|
##
|
39
40
|
# Creates a new Service instance.
|
40
|
-
def initialize project, credentials,
|
41
|
+
def initialize project, credentials, quota_project: nil,
|
41
42
|
host: nil, timeout: nil, lib_name: nil, lib_version: nil
|
42
43
|
@project = project
|
43
44
|
@credentials = credentials
|
45
|
+
@quota_project = quota_project || (credentials.quota_project_id if credentials.respond_to? :quota_project_id)
|
44
46
|
@host = host
|
45
47
|
@timeout = timeout
|
46
48
|
@lib_name = lib_name
|
@@ -68,6 +70,7 @@ module Google
|
|
68
70
|
@service ||= \
|
69
71
|
V1::Spanner::Client.new do |config|
|
70
72
|
config.credentials = channel
|
73
|
+
config.quota_project = @quota_project
|
71
74
|
config.timeout = timeout if timeout
|
72
75
|
config.endpoint = host if host
|
73
76
|
config.lib_name = lib_name_with_prefix
|
@@ -82,6 +85,7 @@ module Google
|
|
82
85
|
@instances ||= \
|
83
86
|
Admin::Instance::V1::InstanceAdmin::Client.new do |config|
|
84
87
|
config.credentials = channel
|
88
|
+
config.quota_project = @quota_project
|
85
89
|
config.timeout = timeout if timeout
|
86
90
|
config.endpoint = host if host
|
87
91
|
config.lib_name = lib_name_with_prefix
|
@@ -96,6 +100,7 @@ module Google
|
|
96
100
|
@databases ||= \
|
97
101
|
Admin::Database::V1::DatabaseAdmin::Client.new do |config|
|
98
102
|
config.credentials = channel
|
103
|
+
config.quota_project = @quota_project
|
99
104
|
config.timeout = timeout if timeout
|
100
105
|
config.endpoint = host if host
|
101
106
|
config.lib_name = lib_name_with_prefix
|
data/lib/google/cloud/spanner.rb
CHANGED
@@ -120,7 +120,7 @@ module Google
|
|
120
120
|
|
121
121
|
Spanner::Project.new(
|
122
122
|
Spanner::Service.new(
|
123
|
-
project_id, credentials,
|
123
|
+
project_id, credentials, quota_project: configure.quota_project,
|
124
124
|
host: endpoint, timeout: timeout, lib_name: lib_name,
|
125
125
|
lib_version: lib_version
|
126
126
|
),
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -333,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: '0'
|
335
335
|
requirements: []
|
336
|
-
rubygems_version: 3.
|
336
|
+
rubygems_version: 3.3.5
|
337
337
|
signing_key:
|
338
338
|
specification_version: 4
|
339
339
|
summary: API Client library for Google Cloud Spanner API
|