diff --git a/protos/google/spanner/v1/spanner.proto b/protos/google/spanner/v1/spanner.proto index ef772170b..77a1f0e47 100644 --- a/protos/google/spanner/v1/spanner.proto +++ b/protos/google/spanner/v1/spanner.proto @@ -643,6 +643,13 @@ message ExecuteSqlRequest { // Common options for this request. RequestOptions request_options = 11; + + // If this is for a partitioned read and this field is set to `true`, the + // request will be executed via Spanner independent compute resources. + // + // If the field is set to `true` but the request does not set + // `partition_token`, the API will return an `INVALID_ARGUMENT` error. + bool data_boost_enabled = 15; } // The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. @@ -949,6 +956,13 @@ message ReadRequest { // Common options for this request. RequestOptions request_options = 11; + + // If this is for a partitioned query and this field is set to `true`, the + // request will be executed via Spanner independent compute resources. + // + // If the field is set to `true` but the request does not set + // `partition_token`, the API will return an `INVALID_ARGUMENT` error. + bool data_boost_enabled = 16; } // The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 91552afe3..b7fd19956 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -17400,6 +17400,9 @@ export namespace google { /** ExecuteSqlRequest requestOptions */ requestOptions?: (google.spanner.v1.IRequestOptions|null); + + /** ExecuteSqlRequest dataBoostEnabled */ + dataBoostEnabled?: (boolean|null); } /** Represents an ExecuteSqlRequest. */ @@ -17444,6 +17447,9 @@ export namespace google { /** ExecuteSqlRequest requestOptions. */ public requestOptions?: (google.spanner.v1.IRequestOptions|null); + /** ExecuteSqlRequest dataBoostEnabled. */ + public dataBoostEnabled: boolean; + /** * Creates a new ExecuteSqlRequest instance using the specified properties. * @param [properties] Properties to set @@ -18566,6 +18572,9 @@ export namespace google { /** ReadRequest requestOptions */ requestOptions?: (google.spanner.v1.IRequestOptions|null); + + /** ReadRequest dataBoostEnabled */ + dataBoostEnabled?: (boolean|null); } /** Represents a ReadRequest. */ @@ -18607,6 +18616,9 @@ export namespace google { /** ReadRequest requestOptions. */ public requestOptions?: (google.spanner.v1.IRequestOptions|null); + /** ReadRequest dataBoostEnabled. */ + public dataBoostEnabled: boolean; + /** * Creates a new ReadRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index ad74f311f..1bfa52a63 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -42925,6 +42925,7 @@ * @property {number|Long|null} [seqno] ExecuteSqlRequest seqno * @property {google.spanner.v1.ExecuteSqlRequest.IQueryOptions|null} [queryOptions] ExecuteSqlRequest queryOptions * @property {google.spanner.v1.IRequestOptions|null} [requestOptions] ExecuteSqlRequest requestOptions + * @property {boolean|null} [dataBoostEnabled] ExecuteSqlRequest dataBoostEnabled */ /** @@ -43031,6 +43032,14 @@ */ ExecuteSqlRequest.prototype.requestOptions = null; + /** + * ExecuteSqlRequest dataBoostEnabled. + * @member {boolean} dataBoostEnabled + * @memberof google.spanner.v1.ExecuteSqlRequest + * @instance + */ + ExecuteSqlRequest.prototype.dataBoostEnabled = false; + /** * Creates a new ExecuteSqlRequest instance using the specified properties. * @function create @@ -43080,6 +43089,8 @@ $root.google.spanner.v1.ExecuteSqlRequest.QueryOptions.encode(message.queryOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.requestOptions != null && Object.hasOwnProperty.call(message, "requestOptions")) $root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.dataBoostEnabled != null && Object.hasOwnProperty.call(message, "dataBoostEnabled")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.dataBoostEnabled); return writer; }; @@ -43177,6 +43188,10 @@ message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32()); break; } + case 15: { + message.dataBoostEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -43266,6 +43281,9 @@ if (error) return "requestOptions." + error; } + if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled")) + if (typeof message.dataBoostEnabled !== "boolean") + return "dataBoostEnabled: boolean expected"; return null; }; @@ -43354,6 +43372,8 @@ throw TypeError(".google.spanner.v1.ExecuteSqlRequest.requestOptions: object expected"); message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions); } + if (object.dataBoostEnabled != null) + message.dataBoostEnabled = Boolean(object.dataBoostEnabled); return message; }; @@ -43399,6 +43419,7 @@ object.seqno = options.longs === String ? "0" : 0; object.queryOptions = null; object.requestOptions = null; + object.dataBoostEnabled = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -43429,6 +43450,8 @@ object.queryOptions = $root.google.spanner.v1.ExecuteSqlRequest.QueryOptions.toObject(message.queryOptions, options); if (message.requestOptions != null && message.hasOwnProperty("requestOptions")) object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options); + if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled")) + object.dataBoostEnabled = message.dataBoostEnabled; return object; }; @@ -46084,6 +46107,7 @@ * @property {Uint8Array|null} [resumeToken] ReadRequest resumeToken * @property {Uint8Array|null} [partitionToken] ReadRequest partitionToken * @property {google.spanner.v1.IRequestOptions|null} [requestOptions] ReadRequest requestOptions + * @property {boolean|null} [dataBoostEnabled] ReadRequest dataBoostEnabled */ /** @@ -46182,6 +46206,14 @@ */ ReadRequest.prototype.requestOptions = null; + /** + * ReadRequest dataBoostEnabled. + * @member {boolean} dataBoostEnabled + * @memberof google.spanner.v1.ReadRequest + * @instance + */ + ReadRequest.prototype.dataBoostEnabled = false; + /** * Creates a new ReadRequest instance using the specified properties. * @function create @@ -46227,6 +46259,8 @@ writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.partitionToken); if (message.requestOptions != null && Object.hasOwnProperty.call(message, "requestOptions")) $root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.dataBoostEnabled != null && Object.hasOwnProperty.call(message, "dataBoostEnabled")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.dataBoostEnabled); return writer; }; @@ -46303,6 +46337,10 @@ message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32()); break; } + case 16: { + message.dataBoostEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -46378,6 +46416,9 @@ if (error) return "requestOptions." + error; } + if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled")) + if (typeof message.dataBoostEnabled !== "boolean") + return "dataBoostEnabled: boolean expected"; return null; }; @@ -46440,6 +46481,8 @@ throw TypeError(".google.spanner.v1.ReadRequest.requestOptions: object expected"); message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions); } + if (object.dataBoostEnabled != null) + message.dataBoostEnabled = Boolean(object.dataBoostEnabled); return message; }; @@ -46484,6 +46527,7 @@ object.partitionToken = $util.newBuffer(object.partitionToken); } object.requestOptions = null; + object.dataBoostEnabled = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -46511,6 +46555,8 @@ object.partitionToken = options.bytes === String ? $util.base64.encode(message.partitionToken, 0, message.partitionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.partitionToken) : message.partitionToken; if (message.requestOptions != null && message.hasOwnProperty("requestOptions")) object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options); + if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled")) + object.dataBoostEnabled = message.dataBoostEnabled; return object; }; diff --git a/protos/protos.json b/protos/protos.json index 9fc57be4b..667d6ecd9 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -4604,6 +4604,10 @@ "requestOptions": { "type": "RequestOptions", "id": 11 + }, + "dataBoostEnabled": { + "type": "bool", + "id": 15 } }, "nested": { @@ -4868,6 +4872,10 @@ "requestOptions": { "type": "RequestOptions", "id": 11 + }, + "dataBoostEnabled": { + "type": "bool", + "id": 16 } } }, diff --git a/src/v1/spanner_client.ts b/src/v1/spanner_client.ts index 3b47a41e6..4f13e606b 100644 --- a/src/v1/spanner_client.ts +++ b/src/v1/spanner_client.ts @@ -824,6 +824,12 @@ export class SpannerClient { * Query optimizer configuration to use for the given query. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. + * @param {boolean} request.dataBoostEnabled + * If this is for a partitioned read and this field is set to `true`, the + * request will be executed via Spanner independent compute resources. + * + * If the field is set to `true` but the request does not set + * `partition_token`, the API will return an `INVALID_ARGUMENT` error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1075,6 +1081,12 @@ export class SpannerClient { * PartitionReadRequest message used to create this partition_token. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. + * @param {boolean} request.dataBoostEnabled + * If this is for a partitioned query and this field is set to `true`, the + * request will be executed via Spanner independent compute resources. + * + * If the field is set to `true` but the request does not set + * `partition_token`, the API will return an `INVALID_ARGUMENT` error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1770,6 +1782,12 @@ export class SpannerClient { * Query optimizer configuration to use for the given query. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. + * @param {boolean} request.dataBoostEnabled + * If this is for a partitioned read and this field is set to `true`, the + * request will be executed via Spanner independent compute resources. + * + * If the field is set to `true` but the request does not set + * `partition_token`, the API will return an `INVALID_ARGUMENT` error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1848,6 +1866,12 @@ export class SpannerClient { * PartitionReadRequest message used to create this partition_token. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. + * @param {boolean} request.dataBoostEnabled + * If this is for a partitioned query and this field is set to `true`, the + * request will be executed via Spanner independent compute resources. + * + * If the field is set to `true` but the request does not set + * `partition_token`, the API will return an `INVALID_ARGUMENT` error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream}