Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,11 @@ public final UnaryCallable<RollbackRequest, Empty> rollbackCallable() {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FirestoreClient firestoreClient = FirestoreClient.create()) {
* RunQueryRequest request = RunQueryRequest.newBuilder().setParent("parent-995424086").build();
* RunQueryRequest request =
* RunQueryRequest.newBuilder()
* .setParent("parent-995424086")
* .setMode(QueryMode.forNumber(0))
* .build();
* ServerStream<RunQueryResponse> stream = firestoreClient.runQueryCallable().call(request);
* for (RunQueryResponse response : stream) {
* // Do something when a response is received.
Expand Down Expand Up @@ -911,7 +915,10 @@ public final ServerStreamingCallable<RunQueryRequest, RunQueryResponse> runQuery
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FirestoreClient firestoreClient = FirestoreClient.create()) {
* RunAggregationQueryRequest request =
* RunAggregationQueryRequest.newBuilder().setParent("parent-995424086").build();
* RunAggregationQueryRequest.newBuilder()
* .setParent("parent-995424086")
* .setMode(QueryMode.forNumber(0))
* .build();
* ServerStream<RunAggregationQueryResponse> stream =
* firestoreClient.runAggregationQueryCallable().call(request);
* for (RunAggregationQueryResponse response : stream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,51 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.QueryMode",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.QueryPlan",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.QueryPlan$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.ResultSetStats",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.ResultSetStats$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.v1.RollbackRequest",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
import com.google.firestore.v1.ListenResponse;
import com.google.firestore.v1.PartitionQueryRequest;
import com.google.firestore.v1.PartitionQueryResponse;
import com.google.firestore.v1.QueryMode;
import com.google.firestore.v1.ResultSetStats;
import com.google.firestore.v1.RollbackRequest;
import com.google.firestore.v1.RunAggregationQueryRequest;
import com.google.firestore.v1.RunAggregationQueryResponse;
Expand Down Expand Up @@ -505,9 +507,14 @@ public void runQueryTest() throws Exception {
.setDocument(Document.newBuilder().build())
.setReadTime(Timestamp.newBuilder().build())
.setSkippedResults(880286183)
.setStats(ResultSetStats.newBuilder().build())
.build();
mockFirestore.addResponse(expectedResponse);
RunQueryRequest request = RunQueryRequest.newBuilder().setParent("parent-995424086").build();
RunQueryRequest request =
RunQueryRequest.newBuilder()
.setParent("parent-995424086")
.setMode(QueryMode.forNumber(0))
.build();

MockStreamObserver<RunQueryResponse> responseObserver = new MockStreamObserver<>();

Expand All @@ -523,7 +530,11 @@ public void runQueryTest() throws Exception {
public void runQueryExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockFirestore.addException(exception);
RunQueryRequest request = RunQueryRequest.newBuilder().setParent("parent-995424086").build();
RunQueryRequest request =
RunQueryRequest.newBuilder()
.setParent("parent-995424086")
.setMode(QueryMode.forNumber(0))
.build();

MockStreamObserver<RunQueryResponse> responseObserver = new MockStreamObserver<>();

Expand All @@ -547,10 +558,14 @@ public void runAggregationQueryTest() throws Exception {
.setResult(AggregationResult.newBuilder().build())
.setTransaction(ByteString.EMPTY)
.setReadTime(Timestamp.newBuilder().build())
.setStats(ResultSetStats.newBuilder().build())
.build();
mockFirestore.addResponse(expectedResponse);
RunAggregationQueryRequest request =
RunAggregationQueryRequest.newBuilder().setParent("parent-995424086").build();
RunAggregationQueryRequest.newBuilder()
.setParent("parent-995424086")
.setMode(QueryMode.forNumber(0))
.build();

MockStreamObserver<RunAggregationQueryResponse> responseObserver = new MockStreamObserver<>();

Expand All @@ -568,7 +583,10 @@ public void runAggregationQueryExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockFirestore.addException(exception);
RunAggregationQueryRequest request =
RunAggregationQueryRequest.newBuilder().setParent("parent-995424086").build();
RunAggregationQueryRequest.newBuilder()
.setParent("parent-995424086")
.setMode(QueryMode.forNumber(0))
.build();

MockStreamObserver<RunAggregationQueryResponse> responseObserver = new MockStreamObserver<>();

Expand Down
Loading