Skip to content

Commit

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

#### datastore:v1beta3

The following keys were deleted:
- schemas.QueryPlan.description
- schemas.QueryPlan.id
- schemas.QueryPlan.properties.planInfo.additionalProperties.description
- schemas.QueryPlan.properties.planInfo.additionalProperties.type
- schemas.QueryPlan.properties.planInfo.description
- schemas.QueryPlan.properties.planInfo.type
- schemas.QueryPlan.type
- schemas.ResultSetStats.description
- schemas.ResultSetStats.id
- schemas.ResultSetStats.properties.queryPlan.$ref
- schemas.ResultSetStats.properties.queryPlan.description
- schemas.ResultSetStats.properties.queryStats.additionalProperties.description
- schemas.ResultSetStats.properties.queryStats.additionalProperties.type
- schemas.ResultSetStats.properties.queryStats.description
- schemas.ResultSetStats.properties.queryStats.type
- schemas.ResultSetStats.type
- schemas.RunAggregationQueryRequest.properties.mode.description
- schemas.RunAggregationQueryRequest.properties.mode.enum
- schemas.RunAggregationQueryRequest.properties.mode.enumDescriptions
- schemas.RunAggregationQueryRequest.properties.mode.type
- schemas.RunAggregationQueryResponse.properties.stats.$ref
- schemas.RunAggregationQueryResponse.properties.stats.description
- schemas.RunQueryRequest.properties.mode.description
- schemas.RunQueryRequest.properties.mode.enum
- schemas.RunQueryRequest.properties.mode.enumDescriptions
- schemas.RunQueryRequest.properties.mode.type
- schemas.RunQueryResponse.properties.stats.$ref
- schemas.RunQueryResponse.properties.stats.description

#### datastore:v1

The following keys were deleted:
- schemas.QueryPlan.description
- schemas.QueryPlan.id
- schemas.QueryPlan.properties.planInfo.additionalProperties.description
- schemas.QueryPlan.properties.planInfo.additionalProperties.type
- schemas.QueryPlan.properties.planInfo.description
- schemas.QueryPlan.properties.planInfo.type
- schemas.QueryPlan.type
- schemas.ResultSetStats.description
- schemas.ResultSetStats.id
- schemas.ResultSetStats.properties.queryPlan.$ref
- schemas.ResultSetStats.properties.queryPlan.description
- schemas.ResultSetStats.properties.queryStats.additionalProperties.description
- schemas.ResultSetStats.properties.queryStats.additionalProperties.type
- schemas.ResultSetStats.properties.queryStats.description
- schemas.ResultSetStats.properties.queryStats.type
- schemas.ResultSetStats.type
- schemas.RunAggregationQueryRequest.properties.mode.description
- schemas.RunAggregationQueryRequest.properties.mode.enum
- schemas.RunAggregationQueryRequest.properties.mode.enumDescriptions
- schemas.RunAggregationQueryRequest.properties.mode.type
- schemas.RunAggregationQueryResponse.properties.stats.$ref
- schemas.RunAggregationQueryResponse.properties.stats.description
- schemas.RunQueryRequest.properties.mode.description
- schemas.RunQueryRequest.properties.mode.enum
- schemas.RunQueryRequest.properties.mode.enumDescriptions
- schemas.RunQueryRequest.properties.mode.type
- schemas.RunQueryResponse.properties.stats.$ref
- schemas.RunQueryResponse.properties.stats.description
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 7, 2024
1 parent ad3a394 commit a1aed54
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 218 deletions.
72 changes: 1 addition & 71 deletions discovery/datastore-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
}
}
},
"revision": "20240117",
"revision": "20240131",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -2119,21 +2119,6 @@
},
"type": "object"
},
"QueryPlan": {
"description": "Plan for the query.",
"id": "QueryPlan",
"properties": {
"planInfo": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Planning phase information for the query. It will include: { \"indexes_used\": [ {\"query_scope\": \"Collection\", \"properties\": \"(foo ASC, __name__ ASC)\"}, {\"query_scope\": \"Collection\", \"properties\": \"(bar ASC, __name__ ASC)\"} ] }",
"type": "object"
}
},
"type": "object"
},
"QueryResultBatch": {
"description": "A batch of results produced by a query.",
"id": "QueryResultBatch",
Expand Down Expand Up @@ -2290,25 +2275,6 @@
"properties": {},
"type": "object"
},
"ResultSetStats": {
"description": "Planning and execution statistics for the query.",
"id": "ResultSetStats",
"properties": {
"queryPlan": {
"$ref": "QueryPlan",
"description": "Plan for the query."
},
"queryStats": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Aggregated statistics from the execution of the query. This will only be present when the request specifies `PROFILE` mode. For example, a query will return the statistics including: { \"results_returned\": \"20\", \"documents_scanned\": \"20\", \"indexes_entries_scanned\": \"10050\", \"total_execution_time\": \"100.7 msecs\" }",
"type": "object"
}
},
"type": "object"
},
"RollbackRequest": {
"description": "The request for Datastore.Rollback.",
"id": "RollbackRequest",
Expand Down Expand Up @@ -2347,20 +2313,6 @@
"$ref": "GqlQuery",
"description": "The GQL query to run. This query must be an aggregation query."
},
"mode": {
"description": "Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.",
"enum": [
"NORMAL",
"PLAN",
"PROFILE"
],
"enumDescriptions": [
"The default mode. Only the query results are returned.",
"This mode returns only the query plan, without any results or execution statistics information.",
"This mode returns both the query plan and the execution statistics along with the results."
],
"type": "string"
},
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID."
Expand All @@ -2384,10 +2336,6 @@
"$ref": "AggregationQuery",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"stats": {
"$ref": "ResultSetStats",
"description": "Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`."
},
"transaction": {
"description": "The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when ReadOptions.new_transaction was set in RunAggregationQueryRequest.read_options.",
"format": "byte",
Expand All @@ -2408,20 +2356,6 @@
"$ref": "GqlQuery",
"description": "The GQL query to run. This query must be a non-aggregation query."
},
"mode": {
"description": "Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.",
"enum": [
"NORMAL",
"PLAN",
"PROFILE"
],
"enumDescriptions": [
"The default mode. Only the query results are returned.",
"This mode returns only the query plan, without any results or execution statistics information.",
"This mode returns both the query plan and the execution statistics along with the results."
],
"type": "string"
},
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID."
Expand Down Expand Up @@ -2449,10 +2383,6 @@
"$ref": "Query",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"stats": {
"$ref": "ResultSetStats",
"description": "Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`."
},
"transaction": {
"description": "The identifier of the transaction that was started as part of this RunQuery request. Set only when ReadOptions.new_transaction was set in RunQueryRequest.read_options.",
"format": "byte",
Expand Down
72 changes: 1 addition & 71 deletions discovery/datastore-v1beta3.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
}
}
},
"revision": "20240117",
"revision": "20240131",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -1565,21 +1565,6 @@
},
"type": "object"
},
"QueryPlan": {
"description": "Plan for the query.",
"id": "QueryPlan",
"properties": {
"planInfo": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Planning phase information for the query. It will include: { \"indexes_used\": [ {\"query_scope\": \"Collection\", \"properties\": \"(foo ASC, __name__ ASC)\"}, {\"query_scope\": \"Collection\", \"properties\": \"(bar ASC, __name__ ASC)\"} ] }",
"type": "object"
}
},
"type": "object"
},
"QueryResultBatch": {
"description": "A batch of results produced by a query.",
"id": "QueryResultBatch",
Expand Down Expand Up @@ -1732,25 +1717,6 @@
"properties": {},
"type": "object"
},
"ResultSetStats": {
"description": "Planning and execution statistics for the query.",
"id": "ResultSetStats",
"properties": {
"queryPlan": {
"$ref": "QueryPlan",
"description": "Plan for the query."
},
"queryStats": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Aggregated statistics from the execution of the query. This will only be present when the request specifies `PROFILE` mode. For example, a query will return the statistics including: { \"results_returned\": \"20\", \"documents_scanned\": \"20\", \"indexes_entries_scanned\": \"10050\", \"total_execution_time\": \"100.7 msecs\" }",
"type": "object"
}
},
"type": "object"
},
"RollbackRequest": {
"description": "The request for Datastore.Rollback.",
"id": "RollbackRequest",
Expand Down Expand Up @@ -1781,20 +1747,6 @@
"$ref": "GqlQuery",
"description": "The GQL query to run. This query must be an aggregation query."
},
"mode": {
"description": "Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.",
"enum": [
"NORMAL",
"PLAN",
"PROFILE"
],
"enumDescriptions": [
"The default mode. Only the query results are returned.",
"This mode returns only the query plan, without any results or execution statistics information.",
"This mode returns both the query plan and the execution statistics along with the results."
],
"type": "string"
},
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID."
Expand All @@ -1817,10 +1769,6 @@
"query": {
"$ref": "AggregationQuery",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"stats": {
"$ref": "ResultSetStats",
"description": "Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`."
}
},
"type": "object"
Expand All @@ -1833,20 +1781,6 @@
"$ref": "GqlQuery",
"description": "The GQL query to run. This query must be a non-aggregation query."
},
"mode": {
"description": "Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.",
"enum": [
"NORMAL",
"PLAN",
"PROFILE"
],
"enumDescriptions": [
"The default mode. Only the query results are returned.",
"This mode returns only the query plan, without any results or execution statistics information.",
"This mode returns both the query plan and the execution statistics along with the results."
],
"type": "string"
},
"partitionId": {
"$ref": "PartitionId",
"description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID."
Expand All @@ -1873,10 +1807,6 @@
"query": {
"$ref": "Query",
"description": "The parsed form of the `GqlQuery` from the request, if it was set."
},
"stats": {
"$ref": "ResultSetStats",
"description": "Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`."
}
},
"type": "object"
Expand Down
38 changes: 0 additions & 38 deletions src/apis/datastore/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1074,15 +1074,6 @@ export namespace datastore_v1 {
*/
startCursor?: string | null;
}
/**
* Plan for the query.
*/
export interface Schema$QueryPlan {
/**
* Planning phase information for the query. It will include: { "indexes_used": [ {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"\}, {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"\} ] \}
*/
planInfo?: {[key: string]: any} | null;
}
/**
* A batch of results produced by a query.
*/
Expand Down Expand Up @@ -1176,19 +1167,6 @@ export namespace datastore_v1 {
* The response for Datastore.ReserveIds.
*/
export interface Schema$ReserveIdsResponse {}
/**
* Planning and execution statistics for the query.
*/
export interface Schema$ResultSetStats {
/**
* Plan for the query.
*/
queryPlan?: Schema$QueryPlan;
/**
* Aggregated statistics from the execution of the query. This will only be present when the request specifies `PROFILE` mode. For example, a query will return the statistics including: { "results_returned": "20", "documents_scanned": "20", "indexes_entries_scanned": "10050", "total_execution_time": "100.7 msecs" \}
*/
queryStats?: {[key: string]: any} | null;
}
/**
* The request for Datastore.Rollback.
*/
Expand Down Expand Up @@ -1222,10 +1200,6 @@ export namespace datastore_v1 {
* The GQL query to run. This query must be an aggregation query.
*/
gqlQuery?: Schema$GqlQuery;
/**
* Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.
*/
mode?: string | null;
/**
* Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID.
*/
Expand All @@ -1247,10 +1221,6 @@ export namespace datastore_v1 {
* The parsed form of the `GqlQuery` from the request, if it was set.
*/
query?: Schema$AggregationQuery;
/**
* Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`.
*/
stats?: Schema$ResultSetStats;
/**
* The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when ReadOptions.new_transaction was set in RunAggregationQueryRequest.read_options.
*/
Expand All @@ -1268,10 +1238,6 @@ export namespace datastore_v1 {
* The GQL query to run. This query must be a non-aggregation query.
*/
gqlQuery?: Schema$GqlQuery;
/**
* Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to `NORMAL` mode where no additional statistics will be returned with the query results.
*/
mode?: string | null;
/**
* Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID.
*/
Expand All @@ -1297,10 +1263,6 @@ export namespace datastore_v1 {
* The parsed form of the `GqlQuery` from the request, if it was set.
*/
query?: Schema$Query;
/**
* Query plan and execution statistics. Note that the returned stats are subject to change as Firestore evolves. This is only present when the request specifies a mode other than `NORMAL`.
*/
stats?: Schema$ResultSetStats;
/**
* The identifier of the transaction that was started as part of this RunQuery request. Set only when ReadOptions.new_transaction was set in RunQueryRequest.read_options.
*/
Expand Down
Loading

0 comments on commit a1aed54

Please sign in to comment.