Pipeline
A pipeline: a source (from FirebaseFirestore.pipeline) followed by stages that filter, transform and aggregate the documents, run by execute. Immutable: each stage method returns a new pipeline with the stage appended.
On Apple platforms, execute with ExecuteOptions that set options other than ExecuteOptions.withAtomic, and source stages with options other than the forced index (CollectionHints.withForceIndex), fail: the iOS SDK's pipeline bridge has no way to pass them.
Types
The options of an execution; besides the typed ones, with sets an option by its backend name. The iOS SDK takes only withAtomic: on Apple platforms, executing with any other fails with UnsupportedOperationException.
The results of an execution, in order, and when the backend computed them.
Functions
Adds field and additionalFields to the documents.
Appends the aggregation aggregateStage.
Appends the aggregation aggregateStage with options.
Replaces the documents with one document holding accumulator and additionalAccumulators.
Binds aliasedExpression and additionalExpressions to variables, by their aliases, for the following stages.
Keeps one document per distinct value of group and additionalGroups (selectables or field names).
Keeps one document per distinct value of the field groupField and additionalGroups (selectables or field names).
Runs the pipeline and completes with its results.
Runs the pipeline with options and completes with its results; on Apple platforms options are not supported (see ExecuteOptions).
Keeps the documents whose vector field vectorField is nearest to vectorValue by distanceMeasure.
Keeps the documents whose vector field vectorField is nearest to vectorValue by distanceMeasure, with options.
Inserts each document of the previous stages at the path in its __name__ field; fails if the document exists.
Inserts each document of the previous stages into collection, with its own id or a new one.
Inserts each document of the previous stages into its own collection, with the id documentIdExpression evaluates to.
Inserts each document of the previous stages into the collection at collectionPath, with its own id or a new one.
Inserts each document of the previous stages into collection, with the id documentIdExpression evaluates to.
Inserts each document of the previous stages into the collection at collectionPath, with the id documentIdExpression evaluates to.
Removes field and additionalFields from the documents.
Removes the fields field and additionalFields from the documents.
Appends the search searchStage. Beta in the Android SDK.
Replaces the documents with selection and additionalSelections (selectables or field names).
Replaces the documents with the field fieldName and additionalSelections (selectables or field names).
This pipeline as a subquery evaluating to the array of its results.
This pipeline as a subquery evaluating to its single result.
One document per element of the array arrayWithAlias, the element under its alias.
Appends unnestStage.
One document per element of the array arrayWithAlias, the element under its alias, with options.
One document per element of the array field arrayField, the element under alias.
Writes each document of the previous stages back to its path, with fields set under their aliases; the stored document is replaced, so fields earlier stages removed are removed from it too. Creates no documents.
Writes each document of the previous stages to collection, with its own id or a new one, creating or replacing the document.
Writes each document of the previous stages to the collection at collectionPath, with its own id or a new one, creating or replacing the document.
Writes each document of the previous stages, with additionalFields added, to the path in its __name__ field, creating or replacing the document (stored fields are not merged).
Writes each document of the previous stages to collection, with the id documentIdExpression evaluates to, creating or replacing the document.
Writes each document of the previous stages to the collection at collectionPath, with the id documentIdExpression evaluates to, creating or replacing the document.
Keeps the documents for which condition is true.