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

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 @@ -599,7 +599,7 @@ public static void checkQueryAndPipelineResultsMatch(Query query, String... expe
}
PipelineSnapshot docsFromPipeline;
try {
docsFromPipeline = waitFor(query.getFirestore().pipeline().convertFrom(query).execute());
docsFromPipeline = waitFor(query.getFirestore().pipeline().createFrom(query).execute());
} catch (Exception e) {
throw new RuntimeException("Pipeline FAILED", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import com.google.firebase.firestore.pipeline.AggregateFunction;
import com.google.firebase.firestore.pipeline.AggregateWithAlias;
import com.google.firebase.firestore.pipeline.AliasedAggregate;
import java.util.Objects;

/** Represents an aggregation that can be performed by Firestore. */
Expand Down Expand Up @@ -66,7 +66,7 @@ public String getOperator() {
}

@NonNull
abstract AggregateWithAlias toPipeline();
abstract AliasedAggregate toPipeline();

/**
* Returns true if the given object is equal to this object. Two `AggregateField` objects are
Expand Down Expand Up @@ -205,7 +205,7 @@ private CountAggregateField() {

@NonNull
@Override
AggregateWithAlias toPipeline() {
AliasedAggregate toPipeline() {
return AggregateFunction.countAll().alias(getAlias());
}
}
Expand All @@ -218,7 +218,7 @@ private SumAggregateField(@NonNull FieldPath fieldPath) {

@NonNull
@Override
AggregateWithAlias toPipeline() {
AliasedAggregate toPipeline() {
return field(getFieldPath()).sum().alias(getAlias());
}
}
Expand All @@ -231,7 +231,7 @@ private AverageAggregateField(@NonNull FieldPath fieldPath) {

@NonNull
@Override
AggregateWithAlias toPipeline() {
AliasedAggregate toPipeline() {
return field(getFieldPath()).avg().alias(getAlias());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,11 @@ static void setClientLanguage(@NonNull String languageToken) {
}

/**
* Build a new Pipeline
* Builds a new Pipeline from this Firestore instance.
*
* NOTE: Pipeline does not have realtime updates support and SDK cache access, it completely relies
* on the connection to the server for the results, and does not augment the results with the SDK
* cache. To get realtime updates and SDK cache access use {@code realTimePipeline()} instead.
*
* @return {@code PipelineSource} for this Firestore instance.
*/
Expand All @@ -896,7 +900,13 @@ public PipelineSource pipeline() {
}

/**
* Build a new RealtimePipeline
* Build a new RealtimePipeline from this Firestore instance.
*
* NOTE: RealtimePipeline utilizes the Firestore realtime backend and SDK cache to provide final
* results, this is the equivalent to classic Firestore {@link Query}, but with more features
* supported. However, its feature set is only a subset of {@code Pipeline}. If you need features
* unavailable in {@code RealtimePipeline} and realtime or SDK cache access are not a must, use
* {@code pipeline()} instead.
*
* @return {@code RealtimePipelineSource} for this Firestore instance.
*/
Expand Down
Loading
Loading