Google Cloud Datastore v1 API - Class DatastoreClientImpl (4.3.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(Datastore.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
NameDescription
grpcClientDatastore.DatastoreClient

The underlying gRPC client.

settingsDatastoreSettings

The base DatastoreSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override Datastore.DatastoreClient GrpcClient { get; }

The underlying gRPC Datastore client

Property Value
TypeDescription
Datastore.DatastoreClient
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
NameDescription
requestAllocateIdsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestAllocateIdsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AllocateIdsResponse>

A Task containing the RPC response.

Overrides

BeginTransaction(BeginTransactionRequest, CallSettings)

public override BeginTransactionResponse BeginTransaction(BeginTransactionRequest request, CallSettings callSettings = null)

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BeginTransactionResponse

The RPC response.

Overrides

BeginTransactionAsync(BeginTransactionRequest, CallSettings)

public override Task<BeginTransactionResponse> BeginTransactionAsync(BeginTransactionRequest request, CallSettings callSettings = null)

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BeginTransactionResponse>

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
NameDescription
requestCommitRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCommitRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CommitResponse>

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
NameDescription
requestLookupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
LookupResponse

The RPC response.

Overrides

LookupAsync(LookupRequest, CallSettings)

public override Task<LookupResponse> LookupAsync(LookupRequest request, CallSettings callSettings = null)

Looks up entities by key.

Parameters
NameDescription
requestLookupRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<LookupResponse>

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
NameDescription
requestReserveIdsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestReserveIdsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ReserveIdsResponse>

A Task containing the RPC response.

Overrides

Rollback(RollbackRequest, CallSettings)

public override RollbackResponse Rollback(RollbackRequest request, CallSettings callSettings = null)

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RollbackResponse

The RPC response.

Overrides

RollbackAsync(RollbackRequest, CallSettings)

public override Task<RollbackResponse> RollbackAsync(RollbackRequest request, CallSettings callSettings = null)

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RollbackResponse>

A Task containing the RPC response.

Overrides

RunAggregationQuery(RunAggregationQueryRequest, CallSettings)

public override RunAggregationQueryResponse RunAggregationQuery(RunAggregationQueryRequest request, CallSettings callSettings = null)

Runs an aggregation query.

Parameters
NameDescription
requestRunAggregationQueryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RunAggregationQueryResponse

The RPC response.

Overrides

RunAggregationQueryAsync(RunAggregationQueryRequest, CallSettings)

public override Task<RunAggregationQueryResponse> RunAggregationQueryAsync(RunAggregationQueryRequest request, CallSettings callSettings = null)

Runs an aggregation query.

Parameters
NameDescription
requestRunAggregationQueryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RunAggregationQueryResponse>

A Task containing the RPC response.

Overrides

RunQuery(RunQueryRequest, CallSettings)

public override RunQueryResponse RunQuery(RunQueryRequest request, CallSettings callSettings = null)

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RunQueryResponse

The RPC response.

Overrides

RunQueryAsync(RunQueryRequest, CallSettings)

public override Task<RunQueryResponse> RunQueryAsync(RunQueryRequest request, CallSettings callSettings = null)

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RunQueryResponse>

A Task containing the RPC response.

Overrides