Skip to content

Commit

Permalink
feat(datastore): update the api
Browse files Browse the repository at this point in the history
#### datastore:v1

The following keys were added:
- schemas.QueryPlan (Total Keys: 4)
- schemas.ResultSetStats (Total Keys: 5)
- schemas.RunAggregationQueryRequest.properties.mode.type (Total Keys: 1)
- schemas.RunAggregationQueryResponse.properties.stats.$ref (Total Keys: 1)
- schemas.RunQueryRequest.properties.mode.type (Total Keys: 1)
- schemas.RunQueryResponse.properties.stats.$ref (Total Keys: 1)

#### datastore:v1beta3

The following keys were added:
- schemas.QueryPlan (Total Keys: 4)
- schemas.ResultSetStats (Total Keys: 5)
- schemas.RunAggregationQueryRequest.properties.mode.type (Total Keys: 1)
- schemas.RunAggregationQueryResponse.properties.stats.$ref (Total Keys: 1)
- schemas.RunQueryRequest.properties.mode.type (Total Keys: 1)
- schemas.RunQueryResponse.properties.stats.$ref (Total Keys: 1)
  • Loading branch information
yoshi-automation committed Jan 26, 2024
1 parent 284d912 commit d7dd78b
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 3 deletions.
22 changes: 22 additions & 0 deletions docs/dyn/datastore_v1.projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ <h3>Method Details</h3>
],
&quot;queryString&quot;: &quot;A String&quot;, # A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
},
&quot;mode&quot;: &quot;A String&quot;, # 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.
&quot;partitionId&quot;: { # A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. A partition ID contains several dimensions: project ID and namespace ID. Partition dimensions: - May be `&quot;&quot;`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state. # 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.
&quot;databaseId&quot;: &quot;A String&quot;, # If not empty, the ID of the database to which the entities belong.
&quot;namespaceId&quot;: &quot;A String&quot;, # If not empty, the ID of the namespace to which the entities belong.
Expand Down Expand Up @@ -1188,6 +1189,16 @@ <h3>Method Details</h3>
&quot;startCursor&quot;: &quot;A String&quot;, # A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
},
},
&quot;stats&quot;: { # Planning and execution statistics for the 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`.
&quot;queryPlan&quot;: { # Plan for the query. # Plan for the query.
&quot;planInfo&quot;: { # Planning phase information for the query. It will include: { &quot;indexes_used&quot;: [ {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(foo ASC, __name__ ASC)&quot;}, {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(bar ASC, __name__ ASC)&quot;} ] }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;queryStats&quot;: { # 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: { &quot;results_returned&quot;: &quot;20&quot;, &quot;documents_scanned&quot;: &quot;20&quot;, &quot;indexes_entries_scanned&quot;: &quot;10050&quot;, &quot;total_execution_time&quot;: &quot;100.7 msecs&quot; }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;transaction&quot;: &quot;A String&quot;, # 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.
}</pre>
</div>
Expand Down Expand Up @@ -1287,6 +1298,7 @@ <h3>Method Details</h3>
],
&quot;queryString&quot;: &quot;A String&quot;, # A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
},
&quot;mode&quot;: &quot;A String&quot;, # 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.
&quot;partitionId&quot;: { # A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. A partition ID contains several dimensions: project ID and namespace ID. Partition dimensions: - May be `&quot;&quot;`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state. # 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.
&quot;databaseId&quot;: &quot;A String&quot;, # If not empty, the ID of the database to which the entities belong.
&quot;namespaceId&quot;: &quot;A String&quot;, # If not empty, the ID of the namespace to which the entities belong.
Expand Down Expand Up @@ -1546,6 +1558,16 @@ <h3>Method Details</h3>
],
&quot;startCursor&quot;: &quot;A String&quot;, # A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
},
&quot;stats&quot;: { # Planning and execution statistics for the 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`.
&quot;queryPlan&quot;: { # Plan for the query. # Plan for the query.
&quot;planInfo&quot;: { # Planning phase information for the query. It will include: { &quot;indexes_used&quot;: [ {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(foo ASC, __name__ ASC)&quot;}, {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(bar ASC, __name__ ASC)&quot;} ] }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;queryStats&quot;: { # 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: { &quot;results_returned&quot;: &quot;20&quot;, &quot;documents_scanned&quot;: &quot;20&quot;, &quot;indexes_entries_scanned&quot;: &quot;10050&quot;, &quot;total_execution_time&quot;: &quot;100.7 msecs&quot; }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;transaction&quot;: &quot;A String&quot;, # 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.
}</pre>
</div>
Expand Down
22 changes: 22 additions & 0 deletions docs/dyn/datastore_v1beta3.projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ <h3>Method Details</h3>
],
&quot;queryString&quot;: &quot;A String&quot;, # A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
},
&quot;mode&quot;: &quot;A String&quot;, # 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.
&quot;partitionId&quot;: { # A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. A partition ID contains several dimensions: project ID and namespace ID. Partition dimensions: - May be `&quot;&quot;`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state. # 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.
&quot;namespaceId&quot;: &quot;A String&quot;, # If not empty, the ID of the namespace to which the entities belong.
&quot;projectId&quot;: &quot;A String&quot;, # The ID of the project to which the entities belong.
Expand Down Expand Up @@ -1012,6 +1013,16 @@ <h3>Method Details</h3>
&quot;startCursor&quot;: &quot;A String&quot;, # A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
},
},
&quot;stats&quot;: { # Planning and execution statistics for the 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`.
&quot;queryPlan&quot;: { # Plan for the query. # Plan for the query.
&quot;planInfo&quot;: { # Planning phase information for the query. It will include: { &quot;indexes_used&quot;: [ {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(foo ASC, __name__ ASC)&quot;}, {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(bar ASC, __name__ ASC)&quot;} ] }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;queryStats&quot;: { # 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: { &quot;results_returned&quot;: &quot;20&quot;, &quot;documents_scanned&quot;: &quot;20&quot;, &quot;indexes_entries_scanned&quot;: &quot;10050&quot;, &quot;total_execution_time&quot;: &quot;100.7 msecs&quot; }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
}</pre>
</div>

Expand Down Expand Up @@ -1107,6 +1118,7 @@ <h3>Method Details</h3>
],
&quot;queryString&quot;: &quot;A String&quot;, # A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
},
&quot;mode&quot;: &quot;A String&quot;, # 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.
&quot;partitionId&quot;: { # A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty. A partition ID contains several dimensions: project ID and namespace ID. Partition dimensions: - May be `&quot;&quot;`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts. Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state. # 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.
&quot;namespaceId&quot;: &quot;A String&quot;, # If not empty, the ID of the namespace to which the entities belong.
&quot;projectId&quot;: &quot;A String&quot;, # The ID of the project to which the entities belong.
Expand Down Expand Up @@ -1353,6 +1365,16 @@ <h3>Method Details</h3>
],
&quot;startCursor&quot;: &quot;A String&quot;, # A starting point for the query results. Query cursors are returned in query result batches and [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
},
&quot;stats&quot;: { # Planning and execution statistics for the 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`.
&quot;queryPlan&quot;: { # Plan for the query. # Plan for the query.
&quot;planInfo&quot;: { # Planning phase information for the query. It will include: { &quot;indexes_used&quot;: [ {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(foo ASC, __name__ ASC)&quot;}, {&quot;query_scope&quot;: &quot;Collection&quot;, &quot;properties&quot;: &quot;(bar ASC, __name__ ASC)&quot;} ] }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
&quot;queryStats&quot;: { # 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: { &quot;results_returned&quot;: &quot;20&quot;, &quot;documents_scanned&quot;: &quot;20&quot;, &quot;indexes_entries_scanned&quot;: &quot;10050&quot;, &quot;total_execution_time&quot;: &quot;100.7 msecs&quot; }
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
},
}</pre>
</div>

Expand Down
72 changes: 71 additions & 1 deletion googleapiclient/discovery_cache/documents/datastore.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
}
}
},
"revision": "20231221",
"revision": "20240117",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -2119,6 +2119,21 @@
},
"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 @@ -2275,6 +2290,25 @@
"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 @@ -2313,6 +2347,20 @@
"$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 @@ -2336,6 +2384,10 @@
"$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 @@ -2356,6 +2408,20 @@
"$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 @@ -2383,6 +2449,10 @@
"$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
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
}
}
},
"revision": "20231221",
"revision": "20240117",
"rootUrl": "https://datastore.googleapis.com/",
"schemas": {
"GoogleDatastoreAdminV1CommonMetadata": {
Expand Down

0 comments on commit d7dd78b

Please sign in to comment.