Google Cloud Datastore v1 API - Class DatastoreClientImpl (4.11.0)

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.

Inheritance

object > DatastoreClient > DatastoreClientImpl

Namespace

Google.Cloud.Datastore.V1

Assembly

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
Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides

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.

Overrides