Skip to content

Commit

Permalink
feat(spanner)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### spanner:v1

The following keys were deleted:
- schemas.BeginTransactionRequest.properties.requestOptions.$ref
- schemas.BeginTransactionRequest.properties.requestOptions.description
- schemas.CommitRequest.properties.requestOptions.$ref
- schemas.CommitRequest.properties.requestOptions.description
- schemas.ExecuteBatchDmlRequest.properties.requestOptions.$ref
- schemas.ExecuteBatchDmlRequest.properties.requestOptions.description
- schemas.ExecuteSqlRequest.properties.requestOptions.$ref
- schemas.ExecuteSqlRequest.properties.requestOptions.description
- schemas.ReadRequest.properties.requestOptions.$ref
- schemas.ReadRequest.properties.requestOptions.description
- schemas.RequestOptions.description
- schemas.RequestOptions.id
- schemas.RequestOptions.properties.priority.description
- schemas.RequestOptions.properties.priority.enum
- schemas.RequestOptions.properties.priority.enumDescriptions
- schemas.RequestOptions.properties.priority.type
- schemas.RequestOptions.type

The following keys were changed:
- schemas.QueryOptions.properties.optimizerStatisticsPackage.description
- schemas.RestoreDatabaseRequest.properties.encryptionConfig.description
  • Loading branch information
yoshi-automation authored and bcoe committed Mar 26, 2021
1 parent afc680a commit 6b9efab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 85 deletions.
49 changes: 3 additions & 46 deletions discovery/spanner-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@
}
}
},
"revision": "20210318",
"revision": "20210309",
"rootUrl": "https://spanner.googleapis.com/",
"schemas": {
"Backup": {
Expand Down Expand Up @@ -2053,10 +2053,6 @@
"options": {
"$ref": "TransactionOptions",
"description": "Required. Options for the new transaction."
},
"requestOptions": {
"$ref": "RequestOptions",
"description": "Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead."
}
},
"type": "object"
Expand Down Expand Up @@ -2114,10 +2110,6 @@
},
"type": "array"
},
"requestOptions": {
"$ref": "RequestOptions",
"description": "Common options for this request."
},
"returnCommitStats": {
"description": "If `true`, then statistics related to the transaction will be included in the CommitResponse. Default value is `false`.",
"type": "boolean"
Expand Down Expand Up @@ -2402,10 +2394,6 @@
"description": "The request for ExecuteBatchDml.",
"id": "ExecuteBatchDmlRequest",
"properties": {
"requestOptions": {
"$ref": "RequestOptions",
"description": "Common options for this request."
},
"seqno": {
"description": "Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution.",
"format": "int64",
Expand Down Expand Up @@ -2485,10 +2473,6 @@
"$ref": "QueryOptions",
"description": "Query optimizer configuration to use for the given query."
},
"requestOptions": {
"$ref": "RequestOptions",
"description": "Common options for this request."
},
"resumeToken": {
"description": "If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.",
"format": "byte",
Expand Down Expand Up @@ -3211,7 +3195,7 @@
"id": "QueryOptions",
"properties": {
"optimizerStatisticsPackage": {
"description": "An option to control the selection of optimizer statistics package. This parameter allows individual queries to use a different query optimizer statistics package. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses the statistics package set at the database level options, or the latest package if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `INFORMATION_SCHEMA.SPANNER_STATISTICS`. Executing a SQL statement with an invalid optimizer statistics package or with a statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.",
"description": "Query optimizer statistics package to use. This parameter allows individual queries to use a different query optimizer statistics. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses statistics package set at the database level options, or latest if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. Executing a SQL statement with an invalid optimizer statistics package or with statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.",
"type": "string"
},
"optimizerVersion": {
Expand Down Expand Up @@ -3299,10 +3283,6 @@
"format": "byte",
"type": "string"
},
"requestOptions": {
"$ref": "RequestOptions",
"description": "Common options for this request."
},
"resumeToken": {
"description": "If this request is resuming a previously interrupted read, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new read to resume where the last read left off. The rest of the request parameters must exactly match the request that yielded this token.",
"format": "byte",
Expand Down Expand Up @@ -3355,29 +3335,6 @@
},
"type": "object"
},
"RequestOptions": {
"description": "Common request options for various APIs.",
"id": "RequestOptions",
"properties": {
"priority": {
"description": "Priority for the request.",
"enum": [
"PRIORITY_UNSPECIFIED",
"PRIORITY_LOW",
"PRIORITY_MEDIUM",
"PRIORITY_HIGH"
],
"enumDescriptions": [
"`PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`.",
"This specifies that the request is low priority.",
"This specifies that the request is medium priority.",
"This specifies that the request is high priority."
],
"type": "string"
}
},
"type": "object"
},
"RestoreDatabaseEncryptionConfig": {
"description": "Encryption configuration for the restored database.",
"id": "RestoreDatabaseEncryptionConfig",
Expand Down Expand Up @@ -3459,7 +3416,7 @@
},
"encryptionConfig": {
"$ref": "RestoreDatabaseEncryptionConfig",
"description": "Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`."
"description": "Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`."
}
},
"type": "object"
Expand Down
42 changes: 3 additions & 39 deletions src/apis/spanner/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ export namespace spanner_v1 {
* Required. Options for the new transaction.
*/
options?: Schema$TransactionOptions;
/**
* Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead.
*/
requestOptions?: Schema$RequestOptions;
}
/**
* Associates `members` with a `role`.
Expand Down Expand Up @@ -264,10 +260,6 @@ export namespace spanner_v1 {
* The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.
*/
mutations?: Schema$Mutation[];
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* If `true`, then statistics related to the transaction will be included in the CommitResponse. Default value is `false`.
*/
Expand Down Expand Up @@ -477,10 +469,6 @@ export namespace spanner_v1 {
* The request for ExecuteBatchDml.
*/
export interface Schema$ExecuteBatchDmlRequest {
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution.
*/
Expand Down Expand Up @@ -531,10 +519,6 @@ export namespace spanner_v1 {
* Query optimizer configuration to use for the given query.
*/
queryOptions?: Schema$QueryOptions;
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.
*/
Expand Down Expand Up @@ -1062,7 +1046,7 @@ export namespace spanner_v1 {
*/
export interface Schema$QueryOptions {
/**
* An option to control the selection of optimizer statistics package. This parameter allows individual queries to use a different query optimizer statistics package. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses the statistics package set at the database level options, or the latest package if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `INFORMATION_SCHEMA.SPANNER_STATISTICS`. Executing a SQL statement with an invalid optimizer statistics package or with a statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.
* Query optimizer statistics package to use. This parameter allows individual queries to use a different query optimizer statistics. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses statistics package set at the database level options, or latest if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. Executing a SQL statement with an invalid optimizer statistics package or with statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.
*/
optimizerStatisticsPackage?: string | null;
/**
Expand Down Expand Up @@ -1132,10 +1116,6 @@ export namespace spanner_v1 {
* If present, results will be restricted to the specified partition previously created using PartitionRead(). There must be an exact match for the values of fields common to this message and the PartitionReadRequest message used to create this partition_token.
*/
partitionToken?: string | null;
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* If this request is resuming a previously interrupted read, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new read to resume where the last read left off. The rest of the request parameters must exactly match the request that yielded this token.
*/
Expand Down Expand Up @@ -1167,15 +1147,6 @@ export namespace spanner_v1 {
*/
type?: string | null;
}
/**
* Common request options for various APIs.
*/
export interface Schema$RequestOptions {
/**
* Priority for the request.
*/
priority?: string | null;
}
/**
* Encryption configuration for the restored database.
*/
Expand Down Expand Up @@ -1231,7 +1202,7 @@ export namespace spanner_v1 {
*/
databaseId?: string | null;
/**
* Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
* Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_DATABASE_ENCRYPTION`.
*/
encryptionConfig?: Schema$RestoreDatabaseEncryptionConfig;
}
Expand Down Expand Up @@ -7642,8 +7613,7 @@ export namespace spanner_v1 {
* requestBody: {
* // request body parameters
* // {
* // "options": {},
* // "requestOptions": {}
* // "options": {}
* // }
* },
* }
Expand Down Expand Up @@ -7787,7 +7757,6 @@ export namespace spanner_v1 {
* // request body parameters
* // {
* // "mutations": [],
* // "requestOptions": {},
* // "returnCommitStats": false,
* // "singleUseTransaction": {},
* // "transactionId": "my_transactionId"
Expand Down Expand Up @@ -8204,7 +8173,6 @@ export namespace spanner_v1 {
* requestBody: {
* // request body parameters
* // {
* // "requestOptions": {},
* // "seqno": "my_seqno",
* // "statements": [],
* // "transaction": {}
Expand Down Expand Up @@ -8362,7 +8330,6 @@ export namespace spanner_v1 {
* // "partitionToken": "my_partitionToken",
* // "queryMode": "my_queryMode",
* // "queryOptions": {},
* // "requestOptions": {},
* // "resumeToken": "my_resumeToken",
* // "seqno": "my_seqno",
* // "sql": "my_sql",
Expand Down Expand Up @@ -8515,7 +8482,6 @@ export namespace spanner_v1 {
* // "partitionToken": "my_partitionToken",
* // "queryMode": "my_queryMode",
* // "queryOptions": {},
* // "requestOptions": {},
* // "resumeToken": "my_resumeToken",
* // "seqno": "my_seqno",
* // "sql": "my_sql",
Expand Down Expand Up @@ -9256,7 +9222,6 @@ export namespace spanner_v1 {
* // "keySet": {},
* // "limit": "my_limit",
* // "partitionToken": "my_partitionToken",
* // "requestOptions": {},
* // "resumeToken": "my_resumeToken",
* // "table": "my_table",
* // "transaction": {}
Expand Down Expand Up @@ -9547,7 +9512,6 @@ export namespace spanner_v1 {
* // "keySet": {},
* // "limit": "my_limit",
* // "partitionToken": "my_partitionToken",
* // "requestOptions": {},
* // "resumeToken": "my_resumeToken",
* // "table": "my_table",
* // "transaction": {}
Expand Down

0 comments on commit 6b9efab

Please sign in to comment.