Skip to content
Open
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
1,577 changes: 806 additions & 771 deletions firebase-firestore/api.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,8 @@ public void testCannotPerformMoreThanMaxAggregations() {

assertThat(e, instanceOf(FirebaseFirestoreException.class));
FirebaseFirestoreException firestoreException = (FirebaseFirestoreException) e;
if (isRunningAgainstEmulator()) {
assertEquals(FirebaseFirestoreException.Code.UNKNOWN, firestoreException.getCode());
} else {
assertEquals(FirebaseFirestoreException.Code.INVALID_ARGUMENT, firestoreException.getCode());
assertTrue(firestoreException.getMessage().contains("maximum number of aggregations"));
}
assertEquals(FirebaseFirestoreException.Code.INVALID_ARGUMENT, firestoreException.getCode());
assertTrue(firestoreException.getMessage().contains("maximum number of aggregations"));
}

@Test
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import com.google.firebase.firestore.FirebaseFirestoreSettings;
import com.google.firebase.firestore.ListenerRegistration;
import com.google.firebase.firestore.MetadataChanges;
import com.google.firebase.firestore.Pipeline;
import com.google.firebase.firestore.PipelineResult;
import com.google.firebase.firestore.PipelineSnapshot;
import com.google.firebase.firestore.Query;
import com.google.firebase.firestore.QuerySnapshot;
import com.google.firebase.firestore.Source;
Expand Down Expand Up @@ -468,7 +468,7 @@ public static List<Map<String, Object>> querySnapshotToValues(QuerySnapshot quer
}

public static List<Map<String, Object>> pipelineSnapshotToValues(
PipelineSnapshot pipelineSnapshot) {
Pipeline.Snapshot pipelineSnapshot) {
List<Map<String, Object>> res = new ArrayList<>();
for (PipelineResult result : pipelineSnapshot) {
res.add(result.getData());
Expand All @@ -484,7 +484,7 @@ public static List<String> querySnapshotToIds(QuerySnapshot querySnapshot) {
return res;
}

public static List<String> pipelineSnapshotToIds(PipelineSnapshot pipelineResults) {
public static List<String> pipelineSnapshotToIds(Pipeline.Snapshot pipelineResults) {
List<String> res = new ArrayList<>();
for (PipelineResult result : pipelineResults) {
DocumentReference ref = result.getRef();
Expand Down Expand Up @@ -597,7 +597,7 @@ public static void checkQueryAndPipelineResultsMatch(Query query, String... expe
} catch (Exception e) {
throw new RuntimeException("Classic Query FAILED", e);
}
PipelineSnapshot docsFromPipeline;
Pipeline.Snapshot docsFromPipeline;
try {
docsFromPipeline = waitFor(query.getFirestore().pipeline().createFrom(query).execute());
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package com.google.firebase.firestore;

import static com.google.firebase.firestore.pipeline.Expr.field;
import static com.google.firebase.firestore.pipeline.Expression.field;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -232,7 +232,7 @@ private AverageAggregateField(@NonNull FieldPath fieldPath) {
@NonNull
@Override
AliasedAggregate toPipeline() {
return field(getFieldPath()).avg().alias(getAlias());
return field(getFieldPath()).average().alias(getAlias());
}
}
}
Loading
Loading