google-cloud-datastore 2.7.0 → 2.7.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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -26
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/datastore/aggregate_query.rb +13 -14
- data/lib/google/cloud/datastore/dataset.rb +2 -2
- data/lib/google/cloud/datastore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 646ed90d461784d6870d425a6f98271a249338a72696200b3b2707d3e4725098
|
4
|
+
data.tar.gz: 963afff082dd55de2dce0f58715bd76c17497e118b0db92b7a542b6dd813b00d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 832baf39842dd1261ee5394284a0cc8448bd65fbf08162cc49a95f16654676f4dae76d4cb80be58a2692f7035f613b3b1668bf6e5f7d73f175a3f3ad7d6e3eb0
|
7
|
+
data.tar.gz: dd2b0d16cf4727a342e305a6c3dee82add4ce10f5faac8c691216e9e4a88d356d89cb49684cc71b92bfe162bc9aa099abca54c260698ca96722400a729a952e7
|
data/AUTHENTICATION.md
CHANGED
@@ -125,15 +125,6 @@ To configure your system for this, simply:
|
|
125
125
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
126
126
|
*should* only be used during development.
|
127
127
|
|
128
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
129
|
-
[dev-console]: https://console.cloud.google.com/project
|
130
|
-
|
131
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
132
|
-
|
133
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
134
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
135
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
136
|
-
|
137
128
|
## Creating a Service Account
|
138
129
|
|
139
130
|
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
@@ -144,31 +135,22 @@ If you are not running this client within [Google Cloud Platform
|
|
144
135
|
environments](#google-cloud-platform-environments), you need a Google
|
145
136
|
Developers service account.
|
146
137
|
|
147
|
-
1. Visit the [Google
|
138
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
148
139
|
1. Create a new project or click on an existing project.
|
149
|
-
1. Activate the
|
140
|
+
1. Activate the menu in the upper left and select **APIs & Services**. From
|
150
141
|
here, you will enable the APIs that your application requires.
|
151
142
|
|
152
|
-
![Enable the APIs that your application requires][enable-apis]
|
153
|
-
|
154
143
|
*Note: You may need to enable billing in order to use these services.*
|
155
144
|
|
156
145
|
1. Select **Credentials** from the side navigation.
|
157
146
|
|
158
|
-
|
159
|
-
|
160
|
-
![Create a new service account][create-new-service-account]
|
161
|
-
|
162
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
163
|
-
|
164
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
165
|
-
guided through downloading a new JSON key file.
|
166
|
-
|
167
|
-
If you want to re-use an existing service account, you can easily generate a
|
168
|
-
new key file. Just select the account you wish to re-use, and click "Generate
|
169
|
-
new JSON key":
|
147
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
148
|
+
"Service account" to be guided through downloading a new JSON key file.
|
170
149
|
|
171
|
-
|
150
|
+
If you want to re-use an existing service account, you can easily generate
|
151
|
+
a new key file. Just select the account you wish to re-use click the pencil
|
152
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
153
|
+
and then select **Add Key**.
|
172
154
|
|
173
155
|
The key file you download will be used by this library to authenticate API
|
174
156
|
requests and should be stored in a secure location.
|
data/CHANGELOG.md
CHANGED
@@ -57,18 +57,20 @@ module Google
|
|
57
57
|
#
|
58
58
|
class AggregateQuery
|
59
59
|
##
|
60
|
-
# @private The Google::Cloud::Datastore::V1::
|
61
|
-
attr_reader :
|
60
|
+
# @private The Google::Cloud::Datastore::V1::AggregationQuery object.
|
61
|
+
attr_reader :grpc
|
62
62
|
|
63
63
|
##
|
64
|
-
# @private
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
# @
|
64
|
+
# @private
|
65
|
+
#
|
66
|
+
# Returns a new AggregateQuery object
|
67
|
+
#
|
68
|
+
# @param query [Google::Cloud::Datastore::V1::Query]
|
69
69
|
def initialize query
|
70
|
-
@
|
71
|
-
|
70
|
+
@grpc = Google::Cloud::Datastore::V1::AggregationQuery.new(
|
71
|
+
nested_query: query,
|
72
|
+
aggregations: []
|
73
|
+
)
|
72
74
|
end
|
73
75
|
|
74
76
|
##
|
@@ -112,7 +114,7 @@ module Google
|
|
112
114
|
#
|
113
115
|
def add_count aggregate_alias: nil
|
114
116
|
aggregate_alias ||= ALIASES[:count]
|
115
|
-
|
117
|
+
@grpc.aggregations << Google::Cloud::Datastore::V1::AggregationQuery::Aggregation.new(
|
116
118
|
count: Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Count.new,
|
117
119
|
alias: aggregate_alias
|
118
120
|
)
|
@@ -122,10 +124,7 @@ module Google
|
|
122
124
|
|
123
125
|
# @private
|
124
126
|
def to_grpc
|
125
|
-
|
126
|
-
nested_query: query,
|
127
|
-
aggregations: aggregates
|
128
|
-
)
|
127
|
+
@grpc
|
129
128
|
end
|
130
129
|
|
131
130
|
##
|
@@ -987,8 +987,8 @@ module Google
|
|
987
987
|
#
|
988
988
|
# @param name [String] The property to filter by.
|
989
989
|
# @param operator [String] The operator to filter by. Defaults to nil.
|
990
|
-
# @param value The value to compare the property to. Defaults
|
991
|
-
# Possible values are:
|
990
|
+
# @param value [Object] The value to compare the property to. Defaults
|
991
|
+
# to nil. Possible values are:
|
992
992
|
# - Integer
|
993
993
|
# - Float/BigDecimal
|
994
994
|
# - String
|
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.7.
|
4
|
+
version: 2.7.1
|
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: 2023-
|
12
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|