public sealed class DatastoreClientImpl : DatastoreClient
Reference documentation and code samples for the Google Cloud Datastore v1 API class DatastoreClientImpl.
Datastore client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Datastore.V1Assembly
Google.Cloud.Datastore.V1.dll
Remarks
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.
Constructors
DatastoreClientImpl(DatastoreClient, DatastoreSettings, ILogger)
public DatastoreClientImpl(Datastore.DatastoreClient grpcClient, DatastoreSettings settings, ILogger logger)
Constructs a client wrapper for the Datastore service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient |
DatastoreDatastoreClient The underlying gRPC client. |
settings |
DatastoreSettings The base DatastoreSettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override Datastore.DatastoreClient GrpcClient { get; }
The underlying gRPC Datastore client
Property Value | |
---|---|
Type | Description |
DatastoreDatastoreClient |
Methods
AllocateIds(AllocateIdsRequest, CallSettings)
public override AllocateIdsResponse AllocateIds(AllocateIdsRequest request, CallSettings callSettings = null)
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
Parameters | |
---|---|
Name | Description |
request |
AllocateIdsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AllocateIdsResponse |
The RPC response. |
AllocateIdsAsync(AllocateIdsRequest, CallSettings)
public override Task<AllocateIdsResponse> AllocateIdsAsync(AllocateIdsRequest request, CallSettings callSettings = null)
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
Parameters | |
---|---|
Name | Description |
request |
AllocateIdsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAllocateIdsResponse |
A Task containing the RPC response. |
BeginTransaction(BeginTransactionRequest, CallSettings)
public override BeginTransactionResponse BeginTransaction(BeginTransactionRequest request, CallSettings callSettings = null)
Begins a new transaction.
Parameters | |
---|---|
Name | Description |
request |
BeginTransactionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BeginTransactionResponse |
The RPC response. |
BeginTransactionAsync(BeginTransactionRequest, CallSettings)
public override Task<BeginTransactionResponse> BeginTransactionAsync(BeginTransactionRequest request, CallSettings callSettings = null)
Begins a new transaction.
Parameters | |
---|---|
Name | Description |
request |
BeginTransactionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBeginTransactionResponse |
A Task containing the RPC response. |
Commit(CommitRequest, CallSettings)
public override CommitResponse Commit(CommitRequest request, CallSettings callSettings = null)
Commits a transaction, optionally creating, deleting or modifying some entities.
Parameters | |
---|---|
Name | Description |
request |
CommitRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CommitResponse |
The RPC response. |
CommitAsync(CommitRequest, CallSettings)
public override Task<CommitResponse> CommitAsync(CommitRequest request, CallSettings callSettings = null)
Commits a transaction, optionally creating, deleting or modifying some entities.
Parameters | |
---|---|
Name | Description |
request |
CommitRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCommitResponse |
A Task containing the RPC response. |
Lookup(LookupRequest, CallSettings)
public override LookupResponse Lookup(LookupRequest request, CallSettings callSettings = null)
Looks up entities by key.
Parameters | |
---|---|
Name | Description |
request |
LookupRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
LookupResponse |
The RPC response. |
LookupAsync(LookupRequest, CallSettings)
public override Task<LookupResponse> LookupAsync(LookupRequest request, CallSettings callSettings = null)
Looks up entities by key.
Parameters | |
---|---|
Name | Description |
request |
LookupRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskLookupResponse |
A Task containing the RPC response. |
ReserveIds(ReserveIdsRequest, CallSettings)
public override ReserveIdsResponse ReserveIds(ReserveIdsRequest request, CallSettings callSettings = null)
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
Parameters | |
---|---|
Name | Description |
request |
ReserveIdsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ReserveIdsResponse |
The RPC response. |
ReserveIdsAsync(ReserveIdsRequest, CallSettings)
public override Task<ReserveIdsResponse> ReserveIdsAsync(ReserveIdsRequest request, CallSettings callSettings = null)
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
Parameters | |
---|---|
Name | Description |
request |
ReserveIdsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskReserveIdsResponse |
A Task containing the RPC response. |
Rollback(RollbackRequest, CallSettings)
public override RollbackResponse Rollback(RollbackRequest request, CallSettings callSettings = null)
Rolls back a transaction.
Parameters | |
---|---|
Name | Description |
request |
RollbackRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RollbackResponse |
The RPC response. |
RollbackAsync(RollbackRequest, CallSettings)
public override Task<RollbackResponse> RollbackAsync(RollbackRequest request, CallSettings callSettings = null)
Rolls back a transaction.
Parameters | |
---|---|
Name | Description |
request |
RollbackRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRollbackResponse |
A Task containing the RPC response. |
RunAggregationQuery(RunAggregationQueryRequest, CallSettings)
public override RunAggregationQueryResponse RunAggregationQuery(RunAggregationQueryRequest request, CallSettings callSettings = null)
Runs an aggregation query.
Parameters | |
---|---|
Name | Description |
request |
RunAggregationQueryRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RunAggregationQueryResponse |
The RPC response. |
RunAggregationQueryAsync(RunAggregationQueryRequest, CallSettings)
public override Task<RunAggregationQueryResponse> RunAggregationQueryAsync(RunAggregationQueryRequest request, CallSettings callSettings = null)
Runs an aggregation query.
Parameters | |
---|---|
Name | Description |
request |
RunAggregationQueryRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRunAggregationQueryResponse |
A Task containing the RPC response. |
RunQuery(RunQueryRequest, CallSettings)
public override RunQueryResponse RunQuery(RunQueryRequest request, CallSettings callSettings = null)
Queries for entities.
Parameters | |
---|---|
Name | Description |
request |
RunQueryRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RunQueryResponse |
The RPC response. |
RunQueryAsync(RunQueryRequest, CallSettings)
public override Task<RunQueryResponse> RunQueryAsync(RunQueryRequest request, CallSettings callSettings = null)
Queries for entities.
Parameters | |
---|---|
Name | Description |
request |
RunQueryRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRunQueryResponse |
A Task containing the RPC response. |