Package google.datastore.v1
Message
AggregationResultBatch
Message
BeginTransactionRequest
Message
BeginTransactionResponse
Message
RunAggregationQueryRequest
Services
service Datastore google/datastore/v1/datastore.proto
Each RPC normalizes the partition IDs of the keys in its input entities, and always returns entities with keys with normalized partition IDs. This applies to all keys and entities, including those in values, except keys with both an empty path and an empty or unset partition ID. Normalization of input keys sets the project ID (if not already set) to the project ID from the request.
Looks up entities by key.
rpc RunQuery
Request: google.datastore.v1.RunQueryRequest
Response:
google.datastore.v1.RunQueryResponse
Queries for entities.
rpc RunAggregationQuery
Request: google.datastore.v1.RunAggregationQueryRequest
Response:
google.datastore.v1.RunAggregationQueryResponse
Runs an aggregation query.
rpc BeginTransaction
Request: google.datastore.v1.BeginTransactionRequest
Response:
google.datastore.v1.BeginTransactionResponse
Begins a new transaction.
Commits a transaction, optionally creating, deleting or modifying some entities.
rpc Rollback
Request: google.datastore.v1.RollbackRequest
Response:
google.datastore.v1.RollbackResponse
Rolls back a transaction.
rpc AllocateIds
Request: google.datastore.v1.AllocateIdsRequest
Response:
google.datastore.v1.AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
rpc ReserveIds
Request: google.datastore.v1.ReserveIdsRequest
Response:
google.datastore.v1.ReserveIdsResponse
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
Messages
message Aggregation (Nested in google.datastore.v1.AggregationQuery ) google/datastore/v1/query.proto
Defines an aggregation that produces a single result.
Field | Type | Description | |
---|---|---|---|
7 | alias |
string
|
Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format
becomes:
Requires:
|
oneof operator
|
|||
1 | count |
google.datastore.v1.AggregationQuery.Aggregation.Count
|
Count aggregator. |
2 | sum |
google.datastore.v1.AggregationQuery.Aggregation.Sum
|
Sum aggregator. |
3 | avg |
google.datastore.v1.AggregationQuery.Aggregation.Avg
|
Average aggregator. |
message AggregationQuery google/datastore/v1/query.proto
Datastore query for running an aggregation over a [Query][google.datastore.v1.Query].
Field | Type | Description | |
---|---|---|---|
3 | aggregations |
repeated
google.datastore.v1.AggregationQuery.Aggregation
|
Optional. Series of aggregations to apply over the results of the
Requires:
|
oneof query_type
|
|||
1 | nested_query |
google.datastore.v1.Query
|
Nested query for aggregation |
message AggregationResult google/datastore/v1/aggregation_result.proto
The result of a single bucket from a Datastore aggregation query.
The keys of aggregate_properties
are the same for all results in an
aggregation query, unlike entity queries which can have different fields
present for each result.
Field | Type | Description | |
---|---|---|---|
2 | aggregate_properties |
map<string, Value>
|
The result of the aggregation functions, ex: The key is the [alias][google.datastore.v1.AggregationQuery.Aggregation.alias] assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query. |
message AggregationResultBatch google/datastore/v1/aggregation_result.proto
A batch of aggregation results produced by an aggregation query.
Field | Type | Description | |
---|---|---|---|
1 | aggregation_results |
repeated
google.datastore.v1.AggregationResult
|
The aggregation results for this batch. |
2 | more_results |
google.datastore.v1.QueryResultBatch.MoreResultsType
|
The state of the query after the current batch.
Only COUNT(*) aggregations are supported in the initial launch. Therefore,
expected result type is limited to |
3 | read_time |
google.protobuf.Timestamp
|
Read timestamp this batch was returned from. In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. |
message AllocateIdsRequest google/datastore/v1/datastore.proto
The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
Field | Type | Description | |
---|---|---|---|
1 | keys |
repeated
google.datastore.v1.Key
|
Required. A list of keys with incomplete key paths for which to allocate IDs. No key may be reserved/read-only. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
message AllocateIdsResponse google/datastore/v1/datastore.proto
The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
Field | Type | Description | |
---|---|---|---|
1 | keys |
repeated
google.datastore.v1.Key
|
The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID. |
message ArrayValue google/datastore/v1/entity.proto
An array value.
Field | Type | Description | |
---|---|---|---|
1 | values |
repeated
google.datastore.v1.Value
|
Values in the array. The order of values in an array is preserved as long as all values have identical settings for 'exclude_from_indexes'. |
message Avg (Nested in google.datastore.v1.AggregationQuery.Aggregation ) google/datastore/v1/query.proto
Average of the values of the requested property.
-
Only numeric values will be aggregated. All non-numeric values including
NULL
are skipped. -
If the aggregated values contain
NaN
, returnsNaN
. Infinity math follows IEEE-754 standards. -
If the aggregated value set is empty, returns
NULL
. -
Always returns the result as a double.
Field | Type | Description | |
---|---|---|---|
1 | property |
google.datastore.v1.PropertyReference
|
The property to aggregate on. |
message BeginTransactionRequest google/datastore/v1/datastore.proto
The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
Field | Type | Description | |
---|---|---|---|
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
10 | transaction_options |
google.datastore.v1.TransactionOptions
|
Options for a new transaction. |
message BeginTransactionResponse google/datastore/v1/datastore.proto
The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
Field | Type | Description | |
---|---|---|---|
1 | transaction |
bytes
|
The transaction identifier (always present). |
message CommitRequest google/datastore/v1/datastore.proto
The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
Field | Type | Description | |
---|---|---|---|
5 | mode |
google.datastore.v1.CommitRequest.Mode
|
The type of commit to perform. Defaults to |
6 | mutations |
repeated
google.datastore.v1.Mutation
|
The mutations to perform. When mode is
When mode is |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
oneof transaction_selector
|
|||
1 | transaction |
bytes
|
The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. |
10 | single_use_transaction |
google.datastore.v1.TransactionOptions
|
Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, [TransactionOptions.mode][google.datastore.v1.TransactionOptions] must be [TransactionOptions.ReadWrite][google.datastore.v1.TransactionOptions.ReadWrite]. |
message CommitResponse google/datastore/v1/datastore.proto
The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
Field | Type | Description | |
---|---|---|---|
3 | mutation_results |
repeated
google.datastore.v1.MutationResult
|
The result of performing the mutations. The i-th mutation result corresponds to the i-th mutation in the request. |
4 | index_updates |
int32
|
The number of index entries updated during the commit, or zero if none were updated. |
8 | commit_time |
google.protobuf.Timestamp
|
The transaction commit timestamp. Not set for non-transactional commits. |
message CompositeFilter google/datastore/v1/query.proto
A filter that merges multiple other filters using the given operator.
Field | Type | Description | |
---|---|---|---|
1 | op |
google.datastore.v1.CompositeFilter.Operator
|
The operator for combining multiple filters. |
2 | filters |
repeated
google.datastore.v1.Filter
|
The list of filters to combine. Requires:
|
message Count (Nested in google.datastore.v1.AggregationQuery.Aggregation ) google/datastore/v1/query.proto
Count of entities that match the query.
The COUNT(*)
aggregation function operates on the entire entity
so it does not require a field reference.
Field | Type | Description | |
---|---|---|---|
1 | up_to |
google.protobuf.Int64Value
|
Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency, and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High-Level Example:
Requires:
|
message Entity google/datastore/v1/entity.proto
A Datastore data object.
Must not exceed 1 MiB - 4 bytes.
Field | Type | Description | |
---|---|---|---|
1 | key |
google.datastore.v1.Key
|
The entity's key. An entity must have a key, unless otherwise documented (for example,
an entity in |
3 | properties |
map<string, Value>
|
The entity's properties.
The map's keys are property names.
A property name matching regex |
message EntityResult google/datastore/v1/query.proto
The result of fetching an entity from Datastore.
Field | Type | Description | |
---|---|---|---|
1 | entity |
google.datastore.v1.Entity
|
The resulting entity. |
3 | cursor |
bytes
|
A cursor that points to the position after the result entity.
Set only when the |
4 | version |
int64
|
The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for
[ For [missing][google.datastore.v1.LookupResponse.missing] entities in
|
5 | update_time |
google.protobuf.Timestamp
|
The time at which the entity was last changed.
This field is set for
[ |
6 | create_time |
google.protobuf.Timestamp
|
The time at which the entity was created.
This field is set for
[ |
message Filter google/datastore/v1/query.proto
A holder for any type of filter.
Field | Type | Description | |
---|---|---|---|
oneof filter_type
|
|||
1 | composite_filter |
google.datastore.v1.CompositeFilter
|
A composite filter. |
2 | property_filter |
google.datastore.v1.PropertyFilter
|
A filter on a property. |
message GqlQuery google/datastore/v1/query.proto
A GQL query.
Field | Type | Description | |
---|---|---|---|
1 | query_string |
string
|
A string of the format described here. |
2 | allow_literals |
bool
|
When false, the query string must not contain any literals and instead must
bind all values. For example,
|
4 | positional_bindings |
repeated
google.datastore.v1.GqlQueryParameter
|
Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in |
5 | named_bindings |
map<string, GqlQueryParameter>
|
For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex |
message GqlQueryParameter google/datastore/v1/query.proto
A binding parameter for a GQL query.
Field | Type | Description | |
---|---|---|---|
oneof parameter_type
|
|||
2 | value |
google.datastore.v1.Value
|
A value parameter. |
3 | cursor |
bytes
|
A query cursor. Query cursors are returned in query result batches. |
message Key google/datastore/v1/entity.proto
A unique identifier for an entity. If a key's partition ID or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.
Field | Type | Description | |
---|---|---|---|
1 | partition_id |
google.datastore.v1.PartitionId
|
Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition. |
2 | path |
repeated
google.datastore.v1.Key.PathElement
|
The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: all of the entity's ancestors
are required to be in the path along with the entity identifier itself.
The only exception is that in some documented cases, the identifier in the
last path element (for the entity) itself may be omitted. For example,
the last path element of the key of A path can never be empty, and a path can have at most 100 elements. |
message KindExpression google/datastore/v1/query.proto
A representation of a kind.
Field | Type | Description | |
---|---|---|---|
1 | name |
string
|
The name of the kind. |
message LookupRequest google/datastore/v1/datastore.proto
The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
Field | Type | Description | |
---|---|---|---|
1 | read_options |
google.datastore.v1.ReadOptions
|
The options for this lookup request. |
3 | keys |
repeated
google.datastore.v1.Key
|
Required. Keys of entities to look up. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
message LookupResponse google/datastore/v1/datastore.proto
The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
Field | Type | Description | |
---|---|---|---|
1 | found |
repeated
google.datastore.v1.EntityResult
|
Entities found as |
2 | missing |
repeated
google.datastore.v1.EntityResult
|
Entities not found as |
3 | deferred |
repeated
google.datastore.v1.Key
|
A list of keys that were not looked up due to resource constraints. The order of results in this field is undefined and has no relation to the order of the keys in the input. |
5 | transaction |
bytes
|
The identifier of the transaction that was started as part of this Lookup request. Set only when [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] was set in [LookupRequest.read_options][google.datastore.v1.LookupRequest.read_options]. |
7 | read_time |
google.protobuf.Timestamp
|
The time at which these entities were read or found missing. |
message Mutation google/datastore/v1/datastore.proto
A mutation to apply to an entity.
Field | Type | Description | |
---|---|---|---|
oneof conflict_detection_strategy
|
|||
8 | base_version |
int64
|
The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts. |
11 | update_time |
google.protobuf.Timestamp
|
The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts. |
oneof operation
|
|||
4 | insert |
google.datastore.v1.Entity
|
The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete. |
5 | update |
google.datastore.v1.Entity
|
The entity to update. The entity must already exist. Must have a complete key path. |
6 | upsert |
google.datastore.v1.Entity
|
The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete. |
7 | delete |
google.datastore.v1.Key
|
The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only. |
message MutationResult google/datastore/v1/datastore.proto
The result of applying a mutation.
Field | Type | Description | |
---|---|---|---|
3 | key |
google.datastore.v1.Key
|
The automatically allocated key. Set only when the mutation allocated a key. |
4 | version |
int64
|
The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity. |
5 | conflict_detected |
bool
|
Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation. |
6 | update_time |
google.protobuf.Timestamp
|
The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'. |
7 | create_time |
google.protobuf.Timestamp
|
The create time of the entity. This field will not be set after a 'delete'. |
message PartitionId google/datastore/v1/entity.proto
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
""
. - 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.
Field | Type | Description | |
---|---|---|---|
2 | project_id |
string
|
The ID of the project to which the entities belong. |
3 | database_id |
string
|
If not empty, the ID of the database to which the entities belong. |
4 | namespace_id |
string
|
If not empty, the ID of the namespace to which the entities belong. |
message PathElement (Nested in google.datastore.v1.Key ) google/datastore/v1/entity.proto
A (kind, ID/name) pair used to construct a key path.
If either name or ID is set, the element is complete. If neither is set, the element is incomplete.
Field | Type | Description | |
---|---|---|---|
1 | kind |
string
|
The kind of the entity. A kind matching regex Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as |
oneof id_type
|
|||
2 | id |
int64
|
The auto-allocated ID of the entity. Never equal to zero. Values less than zero are discouraged and may not be supported in the future. |
3 | name |
string
|
The name of the entity. A name matching regex Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as |
message Projection google/datastore/v1/query.proto
A representation of a property in a projection.
Field | Type | Description | |
---|---|---|---|
1 | property |
google.datastore.v1.PropertyReference
|
The property to project. |
message PropertyFilter google/datastore/v1/query.proto
A filter on a specific property.
Field | Type | Description | |
---|---|---|---|
1 | property |
google.datastore.v1.PropertyReference
|
The property to filter by. |
2 | op |
google.datastore.v1.PropertyFilter.Operator
|
The operator to filter by. |
3 | value |
google.datastore.v1.Value
|
The value to compare the property to. |
message PropertyOrder google/datastore/v1/query.proto
The desired order for a specific property.
Field | Type | Description | |
---|---|---|---|
1 | property |
google.datastore.v1.PropertyReference
|
The property to order by. |
2 | direction |
google.datastore.v1.PropertyOrder.Direction
|
The direction to order by. Defaults to |
message PropertyReference google/datastore/v1/query.proto
A reference to a property relative to the kind expressions.
Field | Type | Description | |
---|---|---|---|
2 | name |
string
|
A reference to a property. Requires:
|
message Query google/datastore/v1/query.proto
A query for entities.
Field | Type | Description | |
---|---|---|---|
2 | projection |
repeated
google.datastore.v1.Projection
|
The projection to return. Defaults to returning all properties. |
3 | kind |
repeated
google.datastore.v1.KindExpression
|
The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified. |
4 | filter |
google.datastore.v1.Filter
|
The filter to apply. |
5 | order |
repeated
google.datastore.v1.PropertyOrder
|
The order to apply to the query results (if empty, order is unspecified). |
6 | distinct_on |
repeated
google.datastore.v1.PropertyReference
|
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned). Requires:
|
7 | start_cursor |
bytes
|
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. |
8 | end_cursor |
bytes
|
An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query. |
10 | offset |
int32
|
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified. |
12 | limit |
google.protobuf.Int32Value
|
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified. |
message QueryResultBatch google/datastore/v1/query.proto
A batch of results produced by a query.
Field | Type | Description | |
---|---|---|---|
1 | entity_result_type |
google.datastore.v1.EntityResult.ResultType
|
The result type for every entity in |
2 | entity_results |
repeated
google.datastore.v1.EntityResult
|
The results for this batch. |
3 | skipped_cursor |
bytes
|
A cursor that points to the position after the last skipped result.
Will be set when |
4 | end_cursor |
bytes
|
A cursor that points to the position after the last result in the batch. |
5 | more_results |
google.datastore.v1.QueryResultBatch.MoreResultsType
|
The state of the query after the current batch. |
6 | skipped_results |
int32
|
The number of results skipped, typically because of an offset. |
7 | snapshot_version |
int64
|
The version number of the snapshot this batch was returned from.
This applies to the range of results from the query's In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries. |
8 | read_time |
google.protobuf.Timestamp
|
Read timestamp this batch was returned from.
This applies to the range of results from the query's In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore. |
message ReadOnly (Nested in google.datastore.v1.TransactionOptions ) google/datastore/v1/datastore.proto
Options specific to read-only transactions.
Field | Type | Description | |
---|---|---|---|
1 | read_time |
google.protobuf.Timestamp
|
Reads entities at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
message ReadOptions google/datastore/v1/datastore.proto
The options shared by read requests.
Field | Type | Description | |
---|---|---|---|
oneof consistency_type
|
|||
1 | read_consistency |
google.datastore.v1.ReadOptions.ReadConsistency
|
The non-transactional read consistency to use. |
2 | transaction |
bytes
|
The identifier of the transaction in which to read. A transaction identifier is returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. |
3 | new_transaction |
google.datastore.v1.TransactionOptions
|
Options for beginning a new transaction for this request. The new transaction identifier will be returned in the corresponding response as either [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction] or [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction]. |
4 | read_time |
google.protobuf.Timestamp
|
Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
message ReadWrite (Nested in google.datastore.v1.TransactionOptions ) google/datastore/v1/datastore.proto
Options specific to read / write transactions.
Field | Type | Description | |
---|---|---|---|
1 | previous_transaction |
bytes
|
The transaction identifier of the transaction being retried. |
message ReserveIdsRequest google/datastore/v1/datastore.proto
The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
Field | Type | Description | |
---|---|---|---|
1 | keys |
repeated
google.datastore.v1.Key
|
Required. A list of keys with complete key paths whose numeric IDs should not be auto-allocated. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
message ReserveIdsResponse google/datastore/v1/datastore.proto
The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
Field | Type | Description |
---|
message RollbackRequest google/datastore/v1/datastore.proto
The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
Field | Type | Description | |
---|---|---|---|
1 | transaction |
bytes
|
Required. The transaction identifier, returned by a call to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
message RollbackResponse google/datastore/v1/datastore.proto
The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty message).
Field | Type | Description |
---|
message RunAggregationQueryRequest google/datastore/v1/datastore.proto
The request for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
Field | Type | Description | |
---|---|---|---|
1 | read_options |
google.datastore.v1.ReadOptions
|
The options for this query. |
2 | partition_id |
google.datastore.v1.PartitionId
|
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. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
oneof query_type
|
|||
3 | aggregation_query |
google.datastore.v1.AggregationQuery
|
The query to run. |
7 | gql_query |
google.datastore.v1.GqlQuery
|
The GQL query to run. This query must be an aggregation query. |
message RunAggregationQueryResponse google/datastore/v1/datastore.proto
The response for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
Field | Type | Description | |
---|---|---|---|
1 | batch |
google.datastore.v1.AggregationResultBatch
|
A batch of aggregation results. Always present. |
2 | query |
google.datastore.v1.AggregationQuery
|
The parsed form of the |
5 | transaction |
bytes
|
The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] was set in [RunAggregationQueryRequest.read_options][google.datastore.v1.RunAggregationQueryRequest.read_options]. |
message RunQueryRequest google/datastore/v1/datastore.proto
The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
Field | Type | Description | |
---|---|---|---|
1 | read_options |
google.datastore.v1.ReadOptions
|
The options for this query. |
2 | partition_id |
google.datastore.v1.PartitionId
|
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. |
8 | project_id |
string
|
Required. The ID of the project against which to make the request. |
9 | database_id |
string
|
The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. |
oneof query_type
|
|||
3 | query |
google.datastore.v1.Query
|
The query to run. |
7 | gql_query |
google.datastore.v1.GqlQuery
|
The GQL query to run. This query must be a non-aggregation query. |
message RunQueryResponse google/datastore/v1/datastore.proto
The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
Field | Type | Description | |
---|---|---|---|
1 | batch |
google.datastore.v1.QueryResultBatch
|
A batch of query results (always present). |
2 | query |
google.datastore.v1.Query
|
The parsed form of the |
5 | transaction |
bytes
|
The identifier of the transaction that was started as part of this RunQuery request. Set only when [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] was set in [RunQueryRequest.read_options][google.datastore.v1.RunQueryRequest.read_options]. |
message Sum (Nested in google.datastore.v1.AggregationQuery.Aggregation ) google/datastore/v1/query.proto
Sum of the values of the requested property.
-
Only numeric values will be aggregated. All non-numeric values including
NULL
are skipped. -
If the aggregated values contain
NaN
, returnsNaN
. Infinity math follows IEEE-754 standards. -
If the aggregated value set is empty, returns 0.
-
Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision.
-
When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.
Field | Type | Description | |
---|---|---|---|
1 | property |
google.datastore.v1.PropertyReference
|
The property to aggregate on. |
message TransactionOptions google/datastore/v1/datastore.proto
Options for beginning a new transaction.
Transactions can be created explicitly with calls to [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
Field | Type | Description | |
---|---|---|---|
oneof mode
|
|||
1 | read_write |
google.datastore.v1.TransactionOptions.ReadWrite
|
The transaction should allow both reads and writes. |
2 | read_only |
google.datastore.v1.TransactionOptions.ReadOnly
|
The transaction should only allow reads. |
message Value google/datastore/v1/entity.proto
A message that can hold any of the supported value types and associated metadata.
Field | Type | Description | |
---|---|---|---|
14 | meaning |
int32
|
The |
19 | exclude_from_indexes |
bool
|
If the value should be excluded from all indexes including those defined explicitly. |
oneof value_type
|
|||
1 | boolean_value |
bool
|
A boolean value. |
2 | integer_value |
int64
|
An integer value. |
3 | double_value |
double
|
A double value. |
5 | key_value |
google.datastore.v1.Key
|
A key value. |
6 | entity_value |
google.datastore.v1.Entity
|
An entity value.
|
8 | geo_point_value |
google.type.LatLng
|
A geo point value representing a point on the surface of Earth. |
9 | array_value |
google.datastore.v1.ArrayValue
|
An array value.
Cannot contain another array value.
A |
10 | timestamp_value |
google.protobuf.Timestamp
|
A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down. |
11 | null_value |
google.protobuf.NullValue
|
A null value. |
17 | string_value |
string
|
A UTF-8 encoded string value.
When |
18 | blob_value |
bytes
|
A blob value.
May have at most 1,000,000 bytes.
When |
Enums
enum Direction google/datastore/v1/query.proto
The sort direction.
Name | Number | Description |
---|---|---|
DIRECTION_UNSPECIFIED |
0 | Unspecified. This value must not be used. |
ASCENDING |
1 | Ascending. |
DESCENDING |
2 | Descending. |
enum Mode google/datastore/v1/datastore.proto
The modes available for commits.
Name | Number | Description |
---|---|---|
MODE_UNSPECIFIED |
0 | Unspecified. This value must not be used. |
TRANSACTIONAL |
1 | Transactional: The mutations are either all applied, or none are applied. Learn about transactions here. |
NON_TRANSACTIONAL |
2 | Non-transactional: The mutations may not apply as all or none. |
enum MoreResultsType google/datastore/v1/query.proto
The possible values for the more_results
field.
Name | Number | Description |
---|---|---|
MORE_RESULTS_TYPE_UNSPECIFIED |
0 | Unspecified. This value is never used. |
NOT_FINISHED |
1 | There may be additional batches to fetch from this query. |
MORE_RESULTS_AFTER_LIMIT |
2 | The query is finished, but there may be more results after the limit. |
MORE_RESULTS_AFTER_CURSOR |
4 | The query is finished, but there may be more results after the end cursor. |
NO_MORE_RESULTS |
3 | The query is finished, and there are no more results. |
enum Operator google/datastore/v1/query.proto
A composite filter operator.
Name | Number | Description |
---|---|---|
OPERATOR_UNSPECIFIED |
0 | Unspecified. This value must not be used. |
AND |
1 | The results are required to satisfy each of the combined filters. |
OR |
2 | Documents are required to satisfy at least one of the combined filters. |
enum Operator google/datastore/v1/query.proto
A property filter operator.
Name | Number | Description |
---|---|---|
OPERATOR_UNSPECIFIED |
0 | Unspecified. This value must not be used. |
LESS_THAN |
1 | The given Requires:
|
LESS_THAN_OR_EQUAL |
2 | The given Requires:
|
GREATER_THAN |
3 | The given Requires:
|
GREATER_THAN_OR_EQUAL |
4 | The given Requires:
|
EQUAL |
5 | The given |
IN |
6 | The given Requires:
|
NOT_EQUAL |
9 | The given Requires:
|
HAS_ANCESTOR |
11 | Limit the result set to the given entity and its descendants. Requires:
|
NOT_IN |
13 | The value of the Requires:
|
enum ReadConsistency google/datastore/v1/datastore.proto
The possible values for read consistencies.
Name | Number | Description |
---|---|---|
READ_CONSISTENCY_UNSPECIFIED |
0 | Unspecified. This value must not be used. |
STRONG |
1 | Strong consistency. |
EVENTUAL |
2 | Eventual consistency. |
enum ResultType google/datastore/v1/query.proto
Specifies what data the 'entity' field contains.
A ResultType
is either implied (for example, in LookupResponse.missing
from datastore.proto
, it is always KEY_ONLY
) or specified by context
(for example, in message QueryResultBatch
, field entity_result_type
specifies a ResultType
for all the values in field entity_results
).
Name | Number | Description |
---|---|---|
RESULT_TYPE_UNSPECIFIED |
0 | Unspecified. This value is never used. |
FULL |
1 | The key and properties. |
PROJECTION |
2 | A projected subset of properties. The entity may have no key. |
KEY_ONLY |
3 | Only the key. |