FirebaseFirestore Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
PipelineSource
@available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
public struct PipelineSource : @unchecked Sendable
A PipelineSource is the entry point for building a Firestore pipeline. It allows you to
specify the source of the data for the pipeline, which can be a collection, a collection group,
a list of documents, or the entire database.
-
Specifies a collection as the data source for the pipeline.
Declaration
Swift
public func collection(_ path: String) -> Pipeline
Parameters
path
|
The path to the collection.
|
Return Value
A Pipeline with the specified collection as its source.
-
Specifies a collection as the data source for the pipeline.
Return Value
A Pipeline with the specified collection as its source.
-
Specifies a collection group as the data source for the pipeline.
Declaration
Swift
public func collectionGroup(_ collectionId: String) -> Pipeline
Parameters
collectionId
|
The ID of the collection group.
|
Return Value
A Pipeline with the specified collection group as its source.
-
Specifies the entire database as the data source for the pipeline.
Declaration
Swift
public func database() -> Pipeline
Return Value
A Pipeline with the entire database as its source.
-
Specifies a list of documents as the data source for the pipeline.
Return Value
A Pipeline with the specified documents as its source.
-
Specifies a list of documents as the data source for the pipeline.
Declaration
Swift
public func documents(_ paths: [String]) -> Pipeline
Parameters
paths
|
An array of document paths.
|
Return Value
A Pipeline with the specified documents as its source.
-
Creates a Pipeline from an existing Query.
This allows you to convert a standard Firestore query into a pipeline, which can then be
further modified with additional pipeline stages.
Parameters
query
|
The Query to convert into a pipeline.
|
Return Value
A Pipeline that is equivalent to the given query.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-13 UTC.
[null,null,["Last updated 2026-01-13 UTC."],[],[]]