GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: simplify logic for HTTP/1.1 REST fallback option (#1138) · googleapis/google-cloud-node@e79f073

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • handwritten/datastore
    • protos/google/datastore/v1
      • query.proto
    • src/v1
      • datastore_admin_client.ts
      • datastore_client.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎handwritten/datastore/protos/google/datastore/v1/query.proto‎

Copy file name to clipboardExpand all lines: handwritten/datastore/protos/google/datastore/v1/query.proto
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,13 @@ message KindExpression {
279279

280280
// A reference to a property relative to the kind expressions.
281281
message PropertyReference {
282-
// The name of the property.
283-
// If name includes "."s, it may be interpreted as a property name path.
282+
// A reference to a property.
283+
//
284+
// Requires:
285+
//
286+
// * MUST be a dot-delimited (`.`) string of segments, where each segment
287+
// conforms to [entity property name][google.datastore.v1.Entity.properties]
288+
// limitations.
284289
string name = 2;
285290
}
286291

Collapse file

‎handwritten/datastore/src/v1/datastore_admin_client.ts‎

Copy file name to clipboardExpand all lines: handwritten/datastore/src/v1/datastore_admin_client.ts
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,15 @@ export class DatastoreAdminClient {
138138
* API remote host.
139139
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
140140
* Follows the structure of {@link gapicConfig}.
141-
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
142-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
141+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
143142
* For more information, please check the
144143
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
145144
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
146145
* need to avoid loading the default gRPC version and want to use the fallback
147146
* HTTP implementation. Load only fallback version and pass it to the constructor:
148147
* ```
149148
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
150-
* const client = new DatastoreAdminClient({fallback: 'rest'}, gax);
149+
* const client = new DatastoreAdminClient({fallback: true}, gax);
151150
* ```
152151
*/
153152
constructor(
@@ -213,7 +212,7 @@ export class DatastoreAdminClient {
213212
}
214213
if (!opts.fallback) {
215214
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
216-
} else if (opts.fallback === 'rest') {
215+
} else {
217216
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
218217
}
219218
if (opts.libName && opts.libVersion) {
@@ -241,7 +240,7 @@ export class DatastoreAdminClient {
241240
auth: this.auth,
242241
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
243242
};
244-
if (opts.fallback === 'rest') {
243+
if (opts.fallback) {
245244
lroOptions.protoJson = protoFilesRoot;
246245
lroOptions.httpRules = [
247246
{
Collapse file

‎handwritten/datastore/src/v1/datastore_client.ts‎

Copy file name to clipboardExpand all lines: handwritten/datastore/src/v1/datastore_client.ts
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,15 @@ export class DatastoreClient {
9595
* API remote host.
9696
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
9797
* Follows the structure of {@link gapicConfig}.
98-
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
99-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
98+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
10099
* For more information, please check the
101100
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
102101
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
103102
* need to avoid loading the default gRPC version and want to use the fallback
104103
* HTTP implementation. Load only fallback version and pass it to the constructor:
105104
* ```
106105
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
107-
* const client = new DatastoreClient({fallback: 'rest'}, gax);
106+
* const client = new DatastoreClient({fallback: true}, gax);
108107
* ```
109108
*/
110109
constructor(
@@ -170,7 +169,7 @@ export class DatastoreClient {
170169
}
171170
if (!opts.fallback) {
172171
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
173-
} else if (opts.fallback === 'rest') {
172+
} else {
174173
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
175174
}
176175
if (opts.libName && opts.libVersion) {
@@ -187,7 +186,7 @@ export class DatastoreClient {
187186
auth: this.auth,
188187
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
189188
};
190-
if (opts.fallback === 'rest') {
189+
if (opts.fallback) {
191190
lroOptions.protoJson = protoFilesRoot;
192191
lroOptions.httpRules = [
193192
{

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.