Classes
AggregationQuery
Datastore query for running an aggregation over a [Query][google.datastore.v1.Query].
AggregationQuery.Types
Container for nested types declared in the AggregationQuery message type.
AggregationQuery.Types.Aggregation
Defines an aggregation that produces a single result.
AggregationQuery.Types.Aggregation.Types
Container for nested types declared in the Aggregation message type.
AggregationQuery.Types.Aggregation.Types.Avg
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.
AggregationQuery.Types.Aggregation.Types.Count
Count of entities that match the query.
The COUNT(*)
aggregation function operates on the entire entity
so it does not require a field reference.
AggregationQuery.Types.Aggregation.Types.Sum
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.
AggregationQueryResults
Represents the result of an AggregationQuery.
AggregationResult
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.
AggregationResultBatch
A batch of aggregation results produced by an aggregation query.
Aggregations
Factory for different types of Aggregations.
AllocateIdsRequest
The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
AllocateIdsResponse
The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
ArrayValue
An array value.
AsyncLazyDatastoreQuery
A Datastore query which is executed lazily. Iterating over this object will provide a sequence of entities; alternatively, all the results can be fetched using GetAllResultsAsync(), or for diagnostic use cases the RPC responses can be viewed using AsResponses(). The lazy evaluation is important: if you iterate over the query multiple times, it will execute multiple times, potentially returning different results each time.
BeginTransactionRequest
The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
BeginTransactionResponse
The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
CommitRequest
The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
CommitRequest.Types
Container for nested types declared in the CommitRequest message type.
CommitResponse
The response for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
CompositeFilter
A filter that merges multiple other filters using the given operator.
CompositeFilter.Types
Container for nested types declared in the CompositeFilter message type.
Datastore
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.
Datastore.DatastoreBase
Base class for server-side implementations of Datastore
Datastore.DatastoreClient
Client for Datastore
DatastoreClient
Datastore client wrapper, for convenient use.
DatastoreClientBuilder
Builder class for DatastoreClient to provide simple configuration of credentials, endpoint etc.
DatastoreClientImpl
Datastore client wrapper implementation, for convenient use.
DatastoreConstants
Constants for use in Datastore.
DatastoreDb
An abstraction over DatastoreClient to simplify operations. Use the Create(string, string, DatastoreClient) method to obtain an instance of this class.
DatastoreDbBuilder
Builder class for DatastoreDb to provide simple configuration of credentials, endpoint etc.
DatastoreDbImpl
Wrapper around DatastoreClient to provide simpler operations.
DatastoreQueryResults
A complete set of query results, fetched and stored in memory. Results are fetched from a LazyDatastoreQuery or AsyncLazyDatastoreQuery until the query-specified limit or end cursor is reached, or no more results are available.
DatastoreSettings
Settings for DatastoreClient instances.
DatastoreTransaction
Convenience wrapper around a Datastore transaction. All mutation operations (Insert(IEnumerable<Entity>), Delete(IEnumerable<Key>), Update(IEnumerable<Entity>) and Upsert(IEnumerable<Entity>)) merely add to a list of mutations which are performed in a single Commit(CallSettings) or CommitAsync(CallSettings) operation. This means the mutation methods are all synchronous and do not take call settings, as they don't perform any API operations.
Datastore limits the number of entities that can be modified in a Commit operation, and therefore one transaction. When modifying a large number of entities, partition the changes into multiple transactions. See Datastore limits for more details on Datastore limits.
Even though transactions aren't inherently related to a specific partition ID, the expected usage is that queries run inside a transaction are likely to be in a single partition, specified in a DatastoreDb used to create the transaction.
Disposing of a transaction calls Rollback(CallSettings) if the transaction has not already been committed or rolled back.
This is an abstract class, implemented by DatastoreTransactionImpl for production use. Users creating their own DatastoreDb subclasses may choose to create fake implementations for testing purposes. There are no abstract methods in this class; instead, all methods either delegate to another or throw NotImplementedException.
DatastoreTransactionImpl
Production implementation of DatastoreTransaction, using a DatastoreClient to implement the operations.
Entity
A Datastore data object.
Must not exceed 1 MiB - 4 bytes.
EntityResult
The result of fetching an entity from Datastore.
EntityResult.Types
Container for nested types declared in the EntityResult message type.
ExecutionStats
Execution statistics for the query.
ExplainMetrics
Explain metrics for the query.
ExplainOptions
Explain options for the query.
Filter
A holder for any type of filter.
FindNearest
Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.
FindNearest.Types
Container for nested types declared in the FindNearest message type.
GqlQuery
A GQL query.
GqlQueryParameter
A binding parameter for a GQL query.
Key
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.
Key.Types
Container for nested types declared in the Key message type.
Key.Types.PathElement
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.
KeyFactory
Provides a convenient way of producing keys of a specific kind, from a specified parent entity or key, or for root entities based on a partition ID.
KindExpression
A representation of a kind.
LazyDatastoreQuery
A Datastore query which is executed lazily. Iterating over this object will provide a sequence of entities; alternatively, all the results can be fetched using GetAllResults(), or for diagnostic use cases the RPC responses can be viewed using AsResponses(). The lazy evaluation is important: if you iterate over the query multiple times, it will execute multiple times, potentially returning different results each time.
LookupRequest
The request for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
LookupResponse
The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
Mutation
A mutation to apply to an entity.
Mutation.Types
Container for nested types declared in the Mutation message type.
MutationResult
The result of applying a mutation.
PartitionId
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.
PlanSummary
Planning phase information for the query.
Projection
A representation of a property in a projection.
PropertyFilter
A filter on a specific property.
PropertyFilter.Types
Container for nested types declared in the PropertyFilter message type.
PropertyMask
The set of arbitrarily nested property paths used to restrict an operation to only a subset of properties in an entity.
PropertyOrder
The desired order for a specific property.
PropertyOrder.Types
Container for nested types declared in the PropertyOrder message type.
PropertyReference
A reference to a property relative to the kind expressions.
PropertyTransform
A transformation of an entity property.
PropertyTransform.Types
Container for nested types declared in the PropertyTransform message type.
Query
A query for entities.
The query stages are executed in the following order:
- kind
- filter
- projection
- order + start_cursor + end_cursor
- offset
- limit
- find_nearest
QueryExtensions
Extension methods around queries.
QueryResultBatch
A batch of results produced by a query.
QueryResultBatch.Types
Container for nested types declared in the QueryResultBatch message type.
ReadOptions
The options shared by read requests.
ReadOptions.Types
Container for nested types declared in the ReadOptions message type.
ReserveIdsRequest
The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
ReserveIdsResponse
The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
RollbackRequest
The request for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
RollbackResponse
The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty message).
RunAggregationQueryRequest
The request for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
RunAggregationQueryResponse
The response for [Datastore.RunAggregationQuery][google.datastore.v1.Datastore.RunAggregationQuery].
RunQueryRequest
The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
RunQueryResponse
The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
TransactionOptions
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.
TransactionOptions.Types
Container for nested types declared in the TransactionOptions message type.
TransactionOptions.Types.ReadOnly
Options specific to read-only transactions.
TransactionOptions.Types.ReadWrite
Options specific to read / write transactions.
Value
A message that can hold any of the supported value types and associated metadata.
ValueExtensions
Extension methods on Value.
Enums
AggregationQuery.QueryTypeOneofCase
Enum of possible cases for the "query_type" oneof.
AggregationQuery.Types.Aggregation.OperatorOneofCase
Enum of possible cases for the "operator" oneof.
CommitRequest.TransactionSelectorOneofCase
Enum of possible cases for the "transaction_selector" oneof.
CommitRequest.Types.Mode
The modes available for commits.
CompositeFilter.Types.Operator
A composite filter operator.
EntityResult.Types.ResultType
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
).
Filter.FilterTypeOneofCase
Enum of possible cases for the "filter_type" oneof.
FindNearest.Types.DistanceMeasure
The distance measure to use when comparing vectors.
GqlQueryParameter.ParameterTypeOneofCase
Enum of possible cases for the "parameter_type" oneof.
Key.Types.PathElement.IdTypeOneofCase
Enum of possible cases for the "id_type" oneof.
Mutation.ConflictDetectionStrategyOneofCase
Enum of possible cases for the "conflict_detection_strategy" oneof.
Mutation.OperationOneofCase
Enum of possible cases for the "operation" oneof.
Mutation.Types.ConflictResolutionStrategy
The possible ways to resolve a conflict detected in a mutation.
PropertyFilter.Types.Operator
A property filter operator.
PropertyOrder.Types.Direction
The sort direction.
PropertyTransform.TransformTypeOneofCase
Enum of possible cases for the "transform_type" oneof.
PropertyTransform.Types.ServerValue
A value that is calculated by the server.
QueryResultBatch.Types.MoreResultsType
The possible values for the more_results
field.
ReadOptions.ConsistencyTypeOneofCase
Enum of possible cases for the "consistency_type" oneof.
ReadOptions.Types.ReadConsistency
The possible values for read consistencies.
RunAggregationQueryRequest.QueryTypeOneofCase
Enum of possible cases for the "query_type" oneof.
RunQueryRequest.QueryTypeOneofCase
Enum of possible cases for the "query_type" oneof.
TransactionOptions.ModeOneofCase
Enum of possible cases for the "mode" oneof.
Value.ValueTypeOneofCase
Enum of possible cases for the "value_type" oneof.