Class Datastore.DatastoreClient (3.4.0)

public class DatastoreClient : ClientBase<Datastore.DatastoreClient>

Client for Datastore

Inheritance

Object > ClientBase > ClientBase<Datastore.DatastoreClient> > Datastore.DatastoreClient

Namespace

Google.Cloud.Datastore.V1

Assembly

Google.Cloud.Datastore.V1.dll

Constructors

DatastoreClient()

protected DatastoreClient()

Protected parameterless constructor to allow creation of test doubles.

DatastoreClient(CallInvoker)

public DatastoreClient(CallInvoker callInvoker)

Creates a new client for Datastore that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

DatastoreClient(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public DatastoreClient(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel to use to make remote calls.

DatastoreClient(ChannelBase)

public DatastoreClient(ChannelBase channel)

Creates a new client for Datastore

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

DatastoreClient(ClientBase.ClientBaseConfiguration)

protected DatastoreClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

AllocateIds(AllocateIdsRequest, CallOptions)

public virtual AllocateIdsResponse AllocateIds(AllocateIdsRequest request, CallOptions options)

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters
NameDescription
requestAllocateIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AllocateIdsResponse

The response received from the server.

AllocateIds(AllocateIdsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AllocateIdsResponse AllocateIds(AllocateIdsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters
NameDescription
requestAllocateIdsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AllocateIdsResponse

The response received from the server.

AllocateIdsAsync(AllocateIdsRequest, CallOptions)

public virtual AsyncUnaryCall<AllocateIdsResponse> AllocateIdsAsync(AllocateIdsRequest request, CallOptions options)

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters
NameDescription
requestAllocateIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AllocateIdsResponse>

The call object.

AllocateIdsAsync(AllocateIdsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AllocateIdsResponse> AllocateIdsAsync(AllocateIdsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters
NameDescription
requestAllocateIdsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AllocateIdsResponse>

The call object.

BeginTransaction(BeginTransactionRequest, CallOptions)

public virtual BeginTransactionResponse BeginTransaction(BeginTransactionRequest request, CallOptions options)

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
BeginTransactionResponse

The response received from the server.

BeginTransaction(BeginTransactionRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual BeginTransactionResponse BeginTransaction(BeginTransactionRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
BeginTransactionResponse

The response received from the server.

BeginTransactionAsync(BeginTransactionRequest, CallOptions)

public virtual AsyncUnaryCall<BeginTransactionResponse> BeginTransactionAsync(BeginTransactionRequest request, CallOptions options)

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<BeginTransactionResponse>

The call object.

BeginTransactionAsync(BeginTransactionRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<BeginTransactionResponse> BeginTransactionAsync(BeginTransactionRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Begins a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<BeginTransactionResponse>

The call object.

Commit(CommitRequest, CallOptions)

public virtual CommitResponse Commit(CommitRequest request, CallOptions options)

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CommitResponse

The response received from the server.

Commit(CommitRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual CommitResponse Commit(CommitRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CommitResponse

The response received from the server.

CommitAsync(CommitRequest, CallOptions)

public virtual AsyncUnaryCall<CommitResponse> CommitAsync(CommitRequest request, CallOptions options)

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<CommitResponse>

The call object.

CommitAsync(CommitRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<CommitResponse> CommitAsync(CommitRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<CommitResponse>

The call object.

Lookup(LookupRequest, CallOptions)

public virtual LookupResponse Lookup(LookupRequest request, CallOptions options)

Looks up entities by key.

Parameters
NameDescription
requestLookupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
LookupResponse

The response received from the server.

Lookup(LookupRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual LookupResponse Lookup(LookupRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Looks up entities by key.

Parameters
NameDescription
requestLookupRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
LookupResponse

The response received from the server.

LookupAsync(LookupRequest, CallOptions)

public virtual AsyncUnaryCall<LookupResponse> LookupAsync(LookupRequest request, CallOptions options)

Looks up entities by key.

Parameters
NameDescription
requestLookupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<LookupResponse>

The call object.

LookupAsync(LookupRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<LookupResponse> LookupAsync(LookupRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Looks up entities by key.

Parameters
NameDescription
requestLookupRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<LookupResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override Datastore.DatastoreClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
Datastore.DatastoreClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Datastore.V1.Datastore.DatastoreClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

ReserveIds(ReserveIdsRequest, CallOptions)

public virtual ReserveIdsResponse ReserveIds(ReserveIdsRequest request, CallOptions options)

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters
NameDescription
requestReserveIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ReserveIdsResponse

The response received from the server.

ReserveIds(ReserveIdsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ReserveIdsResponse ReserveIds(ReserveIdsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters
NameDescription
requestReserveIdsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ReserveIdsResponse

The response received from the server.

ReserveIdsAsync(ReserveIdsRequest, CallOptions)

public virtual AsyncUnaryCall<ReserveIdsResponse> ReserveIdsAsync(ReserveIdsRequest request, CallOptions options)

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters
NameDescription
requestReserveIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ReserveIdsResponse>

The call object.

ReserveIdsAsync(ReserveIdsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ReserveIdsResponse> ReserveIdsAsync(ReserveIdsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters
NameDescription
requestReserveIdsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ReserveIdsResponse>

The call object.

Rollback(RollbackRequest, CallOptions)

public virtual RollbackResponse Rollback(RollbackRequest request, CallOptions options)

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
RollbackResponse

The response received from the server.

Rollback(RollbackRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual RollbackResponse Rollback(RollbackRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
RollbackResponse

The response received from the server.

RollbackAsync(RollbackRequest, CallOptions)

public virtual AsyncUnaryCall<RollbackResponse> RollbackAsync(RollbackRequest request, CallOptions options)

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<RollbackResponse>

The call object.

RollbackAsync(RollbackRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<RollbackResponse> RollbackAsync(RollbackRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Rolls back a transaction.

Parameters
NameDescription
requestRollbackRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<RollbackResponse>

The call object.

RunQuery(RunQueryRequest, CallOptions)

public virtual RunQueryResponse RunQuery(RunQueryRequest request, CallOptions options)

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
RunQueryResponse

The response received from the server.

RunQuery(RunQueryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual RunQueryResponse RunQuery(RunQueryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
RunQueryResponse

The response received from the server.

RunQueryAsync(RunQueryRequest, CallOptions)

public virtual AsyncUnaryCall<RunQueryResponse> RunQueryAsync(RunQueryRequest request, CallOptions options)

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<RunQueryResponse>

The call object.

RunQueryAsync(RunQueryRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<RunQueryResponse> RunQueryAsync(RunQueryRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Queries for entities.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<RunQueryResponse>

The call object.