Firestore v1 API - Class Firestore.FirestoreClient (3.5.1)

public class Firestore.FirestoreClient : ClientBase<Firestore.FirestoreClient>

Reference documentation and code samples for the Firestore v1 API class Firestore.FirestoreClient.

Client for Firestore

Inheritance

object > ClientBase > ClientBaseFirestoreFirestoreClient > Firestore.FirestoreClient

Namespace

Google.Cloud.Firestore.V1

Assembly

Google.Cloud.Firestore.V1.dll

Constructors

FirestoreClient()

protected FirestoreClient()

Protected parameterless constructor to allow creation of test doubles.

FirestoreClient(CallInvoker)

public FirestoreClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

FirestoreClient(ChannelBase)

public FirestoreClient(ChannelBase channel)

Creates a new client for Firestore

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

FirestoreClient(ClientBaseConfiguration)

protected FirestoreClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

BatchGetDocuments(BatchGetDocumentsRequest, CallOptions)

public virtual AsyncServerStreamingCall<BatchGetDocumentsResponse> BatchGetDocuments(BatchGetDocumentsRequest request, CallOptions options)

Gets multiple documents.

Documents returned by this method are not guaranteed to be returned in the same order that they were requested.

Parameters
NameDescription
requestBatchGetDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncServerStreamingCallBatchGetDocumentsResponse

The call object.

BatchGetDocuments(BatchGetDocumentsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncServerStreamingCall<BatchGetDocumentsResponse> BatchGetDocuments(BatchGetDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets multiple documents.

Documents returned by this method are not guaranteed to be returned in the same order that they were requested.

Parameters
NameDescription
requestBatchGetDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncServerStreamingCallBatchGetDocumentsResponse

The call object.

BatchWrite(BatchWriteRequest, CallOptions)

public virtual BatchWriteResponse BatchWrite(BatchWriteRequest request, CallOptions options)

Applies a batch of write operations.

The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.

If you require an atomically applied set of writes, use [Commit][google.firestore.v1.Firestore.Commit] instead.

Parameters
NameDescription
requestBatchWriteRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
BatchWriteResponse

The response received from the server.

BatchWrite(BatchWriteRequest, Metadata, DateTime?, CancellationToken)

public virtual BatchWriteResponse BatchWrite(BatchWriteRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Applies a batch of write operations.

The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.

If you require an atomically applied set of writes, use [Commit][google.firestore.v1.Firestore.Commit] instead.

Parameters
NameDescription
requestBatchWriteRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
BatchWriteResponse

The response received from the server.

BatchWriteAsync(BatchWriteRequest, CallOptions)

public virtual AsyncUnaryCall<BatchWriteResponse> BatchWriteAsync(BatchWriteRequest request, CallOptions options)

Applies a batch of write operations.

The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.

If you require an atomically applied set of writes, use [Commit][google.firestore.v1.Firestore.Commit] instead.

Parameters
NameDescription
requestBatchWriteRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBatchWriteResponse

The call object.

BatchWriteAsync(BatchWriteRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<BatchWriteResponse> BatchWriteAsync(BatchWriteRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Applies a batch of write operations.

The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.

If you require an atomically applied set of writes, use [Commit][google.firestore.v1.Firestore.Commit] instead.

Parameters
NameDescription
requestBatchWriteRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallBatchWriteResponse

The call object.

BeginTransaction(BeginTransactionRequest, CallOptions)

public virtual BeginTransactionResponse BeginTransaction(BeginTransactionRequest request, CallOptions options)

Starts 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, DateTime?, CancellationToken)

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

Starts 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.

deadlineDateTime

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)

Starts a new transaction.

Parameters
NameDescription
requestBeginTransactionRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBeginTransactionResponse

The call object.

BeginTransactionAsync(BeginTransactionRequest, Metadata, DateTime?, CancellationToken)

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

Starts 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.

deadlineDateTime

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
AsyncUnaryCallBeginTransactionResponse

The call object.

Commit(CommitRequest, CallOptions)

public virtual CommitResponse Commit(CommitRequest request, CallOptions options)

Commits a transaction, while optionally updating documents.

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, DateTime?, CancellationToken)

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

Commits a transaction, while optionally updating documents.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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, while optionally updating documents.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCommitResponse

The call object.

CommitAsync(CommitRequest, Metadata, DateTime?, CancellationToken)

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

Commits a transaction, while optionally updating documents.

Parameters
NameDescription
requestCommitRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallCommitResponse

The call object.

CreateDocument(CreateDocumentRequest, CallOptions)

public virtual Document CreateDocument(CreateDocumentRequest request, CallOptions options)

Creates a new document.

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

CreateDocument(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document CreateDocument(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new document.

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

CreateDocumentAsync(CreateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> CreateDocumentAsync(CreateDocumentRequest request, CallOptions options)

Creates a new document.

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

CreateDocumentAsync(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> CreateDocumentAsync(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new document.

Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

DeleteDocument(DeleteDocumentRequest, CallOptions)

public virtual Empty DeleteDocument(DeleteDocumentRequest request, CallOptions options)

Deletes a document.

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteDocument(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteDocument(DeleteDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a document.

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Empty

The response received from the server.

DeleteDocumentAsync(DeleteDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteDocumentAsync(DeleteDocumentRequest request, CallOptions options)

Deletes a document.

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteDocumentAsync(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteDocumentAsync(DeleteDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a document.

Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallEmpty

The call object.

GetDocument(GetDocumentRequest, CallOptions)

public virtual Document GetDocument(GetDocumentRequest request, CallOptions options)

Gets a single document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

GetDocument(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document GetDocument(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

GetDocumentAsync(GetDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, CallOptions options)

Gets a single document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

GetDocumentAsync(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

The call object.

ListCollectionIds(ListCollectionIdsRequest, CallOptions)

public virtual ListCollectionIdsResponse ListCollectionIds(ListCollectionIdsRequest request, CallOptions options)

Lists all the collection IDs underneath a document.

Parameters
NameDescription
requestListCollectionIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListCollectionIdsResponse

The response received from the server.

ListCollectionIds(ListCollectionIdsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListCollectionIdsResponse ListCollectionIds(ListCollectionIdsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all the collection IDs underneath a document.

Parameters
NameDescription
requestListCollectionIdsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
ListCollectionIdsResponse

The response received from the server.

ListCollectionIdsAsync(ListCollectionIdsRequest, CallOptions)

public virtual AsyncUnaryCall<ListCollectionIdsResponse> ListCollectionIdsAsync(ListCollectionIdsRequest request, CallOptions options)

Lists all the collection IDs underneath a document.

Parameters
NameDescription
requestListCollectionIdsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListCollectionIdsResponse

The call object.

ListCollectionIdsAsync(ListCollectionIdsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListCollectionIdsResponse> ListCollectionIdsAsync(ListCollectionIdsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all the collection IDs underneath a document.

Parameters
NameDescription
requestListCollectionIdsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallListCollectionIdsResponse

The call object.

ListDocuments(ListDocumentsRequest, CallOptions)

public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, CallOptions options)

Lists documents.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDocumentsResponse

The response received from the server.

ListDocuments(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists documents.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
ListDocumentsResponse

The response received from the server.

ListDocumentsAsync(ListDocumentsRequest, CallOptions)

public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, CallOptions options)

Lists documents.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListDocumentsResponse

The call object.

ListDocumentsAsync(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists documents.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallListDocumentsResponse

The call object.

Listen(CallOptions)

public virtual AsyncDuplexStreamingCall<ListenRequest, ListenResponse> Listen(CallOptions options)

Listens to changes. This method is only available via gRPC or WebChannel (not REST).

Parameter
NameDescription
optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncDuplexStreamingCallListenRequestListenResponse

The call object.

Listen(Metadata, DateTime?, CancellationToken)

public virtual AsyncDuplexStreamingCall<ListenRequest, ListenResponse> Listen(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Listens to changes. This method is only available via gRPC or WebChannel (not REST).

Parameters
NameDescription
headersMetadata

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

deadlineDateTime

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
AsyncDuplexStreamingCallListenRequestListenResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override Firestore.FirestoreClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
FirestoreFirestoreClient
Overrides

PartitionQuery(PartitionQueryRequest, CallOptions)

public virtual PartitionQueryResponse PartitionQuery(PartitionQueryRequest request, CallOptions options)

Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.

Parameters
NameDescription
requestPartitionQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
PartitionQueryResponse

The response received from the server.

PartitionQuery(PartitionQueryRequest, Metadata, DateTime?, CancellationToken)

public virtual PartitionQueryResponse PartitionQuery(PartitionQueryRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.

Parameters
NameDescription
requestPartitionQueryRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
PartitionQueryResponse

The response received from the server.

PartitionQueryAsync(PartitionQueryRequest, CallOptions)

public virtual AsyncUnaryCall<PartitionQueryResponse> PartitionQueryAsync(PartitionQueryRequest request, CallOptions options)

Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.

Parameters
NameDescription
requestPartitionQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPartitionQueryResponse

The call object.

PartitionQueryAsync(PartitionQueryRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<PartitionQueryResponse> PartitionQueryAsync(PartitionQueryRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.

Parameters
NameDescription
requestPartitionQueryRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallPartitionQueryResponse

The call object.

Rollback(RollbackRequest, CallOptions)

public virtual Empty 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
Empty

The response received from the server.

Rollback(RollbackRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
Empty

The response received from the server.

RollbackAsync(RollbackRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> 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
AsyncUnaryCallEmpty

The call object.

RollbackAsync(RollbackRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallEmpty

The call object.

RunAggregationQuery(RunAggregationQueryRequest, CallOptions)

public virtual AsyncServerStreamingCall<RunAggregationQueryResponse> RunAggregationQuery(RunAggregationQueryRequest request, CallOptions options)

Runs an aggregation query.

Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API allows running an aggregation to produce a series of [AggregationResult][google.firestore.v1.AggregationResult] server-side.

High-Level Example:

-- Return the number of documents in table given a filter.
SELECT COUNT(*) FROM ( SELECT * FROM k where a = true );
Parameters
NameDescription
requestRunAggregationQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncServerStreamingCallRunAggregationQueryResponse

The call object.

RunAggregationQuery(RunAggregationQueryRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncServerStreamingCall<RunAggregationQueryResponse> RunAggregationQuery(RunAggregationQueryRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Runs an aggregation query.

Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API allows running an aggregation to produce a series of [AggregationResult][google.firestore.v1.AggregationResult] server-side.

High-Level Example:

-- Return the number of documents in table given a filter.
SELECT COUNT(*) FROM ( SELECT * FROM k where a = true );
Parameters
NameDescription
requestRunAggregationQueryRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncServerStreamingCallRunAggregationQueryResponse

The call object.

RunQuery(RunQueryRequest, CallOptions)

public virtual AsyncServerStreamingCall<RunQueryResponse> RunQuery(RunQueryRequest request, CallOptions options)

Runs a query.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncServerStreamingCallRunQueryResponse

The call object.

RunQuery(RunQueryRequest, Metadata, DateTime?, CancellationToken)

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

Runs a query.

Parameters
NameDescription
requestRunQueryRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncServerStreamingCallRunQueryResponse

The call object.

UpdateDocument(UpdateDocumentRequest, CallOptions)

public virtual Document UpdateDocument(UpdateDocumentRequest request, CallOptions options)

Updates or inserts a document.

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

UpdateDocument(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual Document UpdateDocument(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates or inserts a document.

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
Document

The response received from the server.

UpdateDocumentAsync(UpdateDocumentRequest, CallOptions)

public virtual AsyncUnaryCall<Document> UpdateDocumentAsync(UpdateDocumentRequest request, CallOptions options)

Updates or inserts a document.

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDocument

The call object.

UpdateDocumentAsync(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Document> UpdateDocumentAsync(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates or inserts a document.

Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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
AsyncUnaryCallDocument

The call object.

Write(CallOptions)

public virtual AsyncDuplexStreamingCall<WriteRequest, WriteResponse> Write(CallOptions options)

Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).

Parameter
NameDescription
optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncDuplexStreamingCallWriteRequestWriteResponse

The call object.

Write(Metadata, DateTime?, CancellationToken)

public virtual AsyncDuplexStreamingCall<WriteRequest, WriteResponse> Write(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).

Parameters
NameDescription
headersMetadata

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

deadlineDateTime

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
AsyncDuplexStreamingCallWriteRequestWriteResponse

The call object.