Package com.google.firestore.v1
Class FirestoreGrpc.FirestoreStub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<FirestoreGrpc.FirestoreStub>
com.google.firestore.v1.FirestoreGrpc.FirestoreStub
- Enclosing class:
- FirestoreGrpc
public static final class FirestoreGrpc.FirestoreStub
extends io.grpc.stub.AbstractAsyncStub<FirestoreGrpc.FirestoreStub>
A stub to allow clients to do asynchronous rpc calls to service Firestore.
The Cloud Firestore service. Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL document database that simplifies storing, syncing, and querying data for your mobile, web, and IoT apps at global scale. Its client libraries provide live synchronization and offline support, while its security features and integrations with Firebase and Google Cloud Platform accelerate building truly serverless apps.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionvoidbatchGetDocuments(BatchGetDocumentsRequest request, io.grpc.stub.StreamObserver<BatchGetDocumentsResponse> responseObserver) Gets multiple documents.voidbatchWrite(BatchWriteRequest request, io.grpc.stub.StreamObserver<BatchWriteResponse> responseObserver) Applies a batch of write operations.voidbeginTransaction(BeginTransactionRequest request, io.grpc.stub.StreamObserver<BeginTransactionResponse> responseObserver) Starts a new transaction.protected FirestoreGrpc.FirestoreStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidcommit(CommitRequest request, io.grpc.stub.StreamObserver<CommitResponse> responseObserver) Commits a transaction, while optionally updating documents.voidcreateDocument(CreateDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Creates a new document.voiddeleteDocument(DeleteDocumentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Deletes a document.voidgetDocument(GetDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Gets a single document.voidlistCollectionIds(ListCollectionIdsRequest request, io.grpc.stub.StreamObserver<ListCollectionIdsResponse> responseObserver) Lists all the collection IDs underneath a document.voidlistDocuments(ListDocumentsRequest request, io.grpc.stub.StreamObserver<ListDocumentsResponse> responseObserver) Lists documents.io.grpc.stub.StreamObserver<ListenRequest>listen(io.grpc.stub.StreamObserver<ListenResponse> responseObserver) Listens to changes.voidpartitionQuery(PartitionQueryRequest request, io.grpc.stub.StreamObserver<PartitionQueryResponse> responseObserver) Partitions a query by returning partition cursors that can be used to run the query in parallel.voidrollback(RollbackRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Rolls back a transaction.voidrunAggregationQuery(RunAggregationQueryRequest request, io.grpc.stub.StreamObserver<RunAggregationQueryResponse> responseObserver) Runs an aggregation query.voidrunQuery(RunQueryRequest request, io.grpc.stub.StreamObserver<RunQueryResponse> responseObserver) Runs a query.voidupdateDocument(UpdateDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Updates or inserts a document.io.grpc.stub.StreamObserver<WriteRequest>write(io.grpc.stub.StreamObserver<WriteResponse> responseObserver) Streams batches of document updates and deletes, in order.Methods inherited from class io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected FirestoreGrpc.FirestoreStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<FirestoreGrpc.FirestoreStub>
-
getDocument
public void getDocument(GetDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Gets a single document.
-
listDocuments
public void listDocuments(ListDocumentsRequest request, io.grpc.stub.StreamObserver<ListDocumentsResponse> responseObserver) Lists documents.
-
updateDocument
public void updateDocument(UpdateDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Updates or inserts a document.
-
deleteDocument
public void deleteDocument(DeleteDocumentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Deletes a document.
-
batchGetDocuments
public void batchGetDocuments(BatchGetDocumentsRequest request, io.grpc.stub.StreamObserver<BatchGetDocumentsResponse> responseObserver) Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.
-
beginTransaction
public void beginTransaction(BeginTransactionRequest request, io.grpc.stub.StreamObserver<BeginTransactionResponse> responseObserver) Starts a new transaction.
-
commit
public void commit(CommitRequest request, io.grpc.stub.StreamObserver<CommitResponse> responseObserver) Commits a transaction, while optionally updating documents.
-
rollback
public void rollback(RollbackRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Rolls back a transaction.
-
runQuery
public void runQuery(RunQueryRequest request, io.grpc.stub.StreamObserver<RunQueryResponse> responseObserver) Runs a query.
-
runAggregationQuery
public void runAggregationQuery(RunAggregationQueryRequest request, io.grpc.stub.StreamObserver<RunAggregationQueryResponse> responseObserver) 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 ); ```
-
partitionQuery
public void partitionQuery(PartitionQueryRequest request, io.grpc.stub.StreamObserver<PartitionQueryResponse> responseObserver) 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.
-
write
public io.grpc.stub.StreamObserver<WriteRequest> write(io.grpc.stub.StreamObserver<WriteResponse> responseObserver) Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
-
listen
public io.grpc.stub.StreamObserver<ListenRequest> listen(io.grpc.stub.StreamObserver<ListenResponse> responseObserver) Listens to changes. This method is only available via gRPC or WebChannel (not REST).
-
listCollectionIds
public void listCollectionIds(ListCollectionIdsRequest request, io.grpc.stub.StreamObserver<ListCollectionIdsResponse> responseObserver) Lists all the collection IDs underneath a document.
-
batchWrite
public void batchWrite(BatchWriteRequest request, io.grpc.stub.StreamObserver<BatchWriteResponse> responseObserver) 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.
-
createDocument
public void createDocument(CreateDocumentRequest request, io.grpc.stub.StreamObserver<Document> responseObserver) Creates a new document.
-