google-cloud-datastore 2.8.0 → 2.9.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 +6 -0
- data/lib/google/cloud/datastore/dataset/aggregate_query_results.rb +1 -2
- data/lib/google/cloud/datastore/gql_query.rb +3 -4
- data/lib/google/cloud/datastore/key.rb +1 -1
- data/lib/google/cloud/datastore/properties.rb +3 -2
- data/lib/google/cloud/datastore/service.rb +2 -3
- data/lib/google/cloud/datastore/version.rb +1 -1
- data/lib/google/cloud/datastore.rb +1 -1
- data/lib/google-cloud-datastore.rb +5 -2
- metadata +4 -144
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed10b12e2ec3c4588dba12b44b76116605981600f15623e1a4a48af8646424ba
|
4
|
+
data.tar.gz: '095dcff60d7ab782f182264f20f0294be2f01b61278fbd448b307b9d7b922504'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abddd5e808cb0b94c4fd26f5c0a18df08cbf211894e1b732cbbe1f611f225cf311450df52d61c6eca430b74483b222ea48b55a30d8139d92bdc25e355fb1d55a
|
7
|
+
data.tar.gz: 3df7cd4c6ca17d8ab1770ec93a92c4426f67f16eb0fe15335c6986a1f568ca16c2058290605a490984b5598fc266380339ac0b6f613562ceda2fc541d7e24063
|
data/CHANGELOG.md
CHANGED
@@ -120,10 +120,9 @@ module Google
|
|
120
120
|
[aggregate_alias, value.double_value]
|
121
121
|
end
|
122
122
|
end
|
123
|
-
.to_h
|
124
123
|
|
125
124
|
new.tap do |s|
|
126
|
-
s.instance_variable_set :@aggregate_fields, aggregate_fields
|
125
|
+
s.instance_variable_set :@aggregate_fields, aggregate_fields.to_h
|
127
126
|
s.instance_variable_set :@read_time, aggregate_query_response.batch.read_time
|
128
127
|
end
|
129
128
|
end
|
@@ -127,15 +127,14 @@ module Google
|
|
127
127
|
# query string to valid GQL arguments
|
128
128
|
#
|
129
129
|
def named_bindings
|
130
|
-
|
130
|
+
bindings_elems = @grpc.named_bindings.map do |name, gql_query_param|
|
131
131
|
if gql_query_param.parameter_type == :cursor
|
132
132
|
[name, Cursor.from_grpc(gql_query_param.cursor)]
|
133
133
|
else
|
134
134
|
[name, Convert.from_value(gql_query_param.value)]
|
135
135
|
end
|
136
|
-
end
|
137
|
-
|
138
|
-
bindings
|
136
|
+
end
|
137
|
+
bindings_elems.to_h.freeze
|
139
138
|
end
|
140
139
|
|
141
140
|
##
|
@@ -74,12 +74,13 @@ module Google
|
|
74
74
|
|
75
75
|
def to_grpc
|
76
76
|
# Convert to Hash with Google::Cloud::Datastore::V1::Value values.
|
77
|
-
|
77
|
+
@hash.to_h { |k, v| [k.to_s, Convert.to_value(v)] }
|
78
78
|
end
|
79
79
|
|
80
80
|
def self.from_grpc grpc_map
|
81
81
|
# Convert to Hash of string keys and raw values.
|
82
|
-
|
82
|
+
map_elems = grpc_map.map { |k, v| [k.to_s, Convert.from_value(v)] }
|
83
|
+
new map_elems.to_h
|
83
84
|
end
|
84
85
|
|
85
86
|
protected
|
@@ -117,14 +117,13 @@ module Google
|
|
117
117
|
def begin_transaction read_only: nil, previous_transaction: nil, read_time: nil
|
118
118
|
if read_only
|
119
119
|
transaction_options = Google::Cloud::Datastore::V1::TransactionOptions.new
|
120
|
-
transaction_options.read_only =
|
120
|
+
transaction_options.read_only =
|
121
121
|
Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly.new \
|
122
122
|
read_time: read_time_to_timestamp(read_time)
|
123
123
|
|
124
124
|
end
|
125
125
|
if previous_transaction
|
126
|
-
transaction_options ||=
|
127
|
-
Google::Cloud::Datastore::V1::TransactionOptions.new
|
126
|
+
transaction_options ||= Google::Cloud::Datastore::V1::TransactionOptions.new
|
128
127
|
rw = Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite.new(
|
129
128
|
previous_transaction: previous_transaction.encode("ASCII-8BIT")
|
130
129
|
)
|
@@ -127,7 +127,7 @@ module Google
|
|
127
127
|
)
|
128
128
|
end
|
129
129
|
|
130
|
-
credentials ||=
|
130
|
+
credentials ||= keyfile || default_credentials(scope: scope)
|
131
131
|
unless credentials.is_a? Google::Auth::Credentials
|
132
132
|
credentials = Datastore::Credentials.new credentials, scope: scope
|
133
133
|
end
|
@@ -68,8 +68,10 @@ module Google
|
|
68
68
|
# datastore = gcloud.datastore scope: platform_scope
|
69
69
|
#
|
70
70
|
def datastore scope: nil, timeout: nil, database_id: nil
|
71
|
+
timeout ||= @timeout
|
71
72
|
Google::Cloud.datastore @project, @keyfile,
|
72
|
-
scope: scope,
|
73
|
+
scope: scope,
|
74
|
+
timeout: timeout,
|
73
75
|
database_id: database_id
|
74
76
|
end
|
75
77
|
|
@@ -117,7 +119,8 @@ module Google
|
|
117
119
|
require "google/cloud/datastore"
|
118
120
|
Google::Cloud::Datastore.new project_id: project_id,
|
119
121
|
credentials: credentials,
|
120
|
-
scope: scope,
|
122
|
+
scope: scope,
|
123
|
+
timeout: timeout,
|
121
124
|
database_id: database_id
|
122
125
|
end
|
123
126
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-datastore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.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: 2024-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -39,146 +39,6 @@ dependencies:
|
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0.0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: google-style
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - "~>"
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 1.25.1
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - "~>"
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: 1.25.1
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: minitest
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - "~>"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '5.16'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '5.16'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: minitest-autotest
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - "~>"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '1.0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '1.0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: minitest-focus
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - "~>"
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '1.1'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '1.1'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: minitest-rg
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - "~>"
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '5.2'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '5.2'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: autotest-suffix
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
-
requirements:
|
116
|
-
- - "~>"
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '1.1'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - "~>"
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '1.1'
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: redcarpet
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
requirements:
|
130
|
-
- - "~>"
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: '3.0'
|
133
|
-
type: :development
|
134
|
-
prerelease: false
|
135
|
-
version_requirements: !ruby/object:Gem::Requirement
|
136
|
-
requirements:
|
137
|
-
- - "~>"
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: '3.0'
|
140
|
-
- !ruby/object:Gem::Dependency
|
141
|
-
name: simplecov
|
142
|
-
requirement: !ruby/object:Gem::Requirement
|
143
|
-
requirements:
|
144
|
-
- - "~>"
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: '0.9'
|
147
|
-
type: :development
|
148
|
-
prerelease: false
|
149
|
-
version_requirements: !ruby/object:Gem::Requirement
|
150
|
-
requirements:
|
151
|
-
- - "~>"
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
version: '0.9'
|
154
|
-
- !ruby/object:Gem::Dependency
|
155
|
-
name: yard
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
157
|
-
requirements:
|
158
|
-
- - "~>"
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '0.9'
|
161
|
-
type: :development
|
162
|
-
prerelease: false
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- - "~>"
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: '0.9'
|
168
|
-
- !ruby/object:Gem::Dependency
|
169
|
-
name: yard-doctest
|
170
|
-
requirement: !ruby/object:Gem::Requirement
|
171
|
-
requirements:
|
172
|
-
- - "~>"
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version: 0.1.13
|
175
|
-
type: :development
|
176
|
-
prerelease: false
|
177
|
-
version_requirements: !ruby/object:Gem::Requirement
|
178
|
-
requirements:
|
179
|
-
- - "~>"
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: 0.1.13
|
182
42
|
description: google-cloud-datastore is the official library for Google Cloud Datastore.
|
183
43
|
email:
|
184
44
|
- mike@blowmage.com
|
@@ -231,14 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
91
|
requirements:
|
232
92
|
- - ">="
|
233
93
|
- !ruby/object:Gem::Version
|
234
|
-
version: '2.
|
94
|
+
version: '2.7'
|
235
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
96
|
requirements:
|
237
97
|
- - ">="
|
238
98
|
- !ruby/object:Gem::Version
|
239
99
|
version: '0'
|
240
100
|
requirements: []
|
241
|
-
rubygems_version: 3.
|
101
|
+
rubygems_version: 3.5.6
|
242
102
|
signing_key:
|
243
103
|
specification_version: 4
|
244
104
|
summary: API Client library for Google Cloud Datastore
|