FirebaseFirestore Framework Reference

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.

    Declaration

    Swift

    public func collection(_ coll: CollectionReference) -> Pipeline

    Parameters

    coll

    The CollectionReference of the collection.

    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.

    Declaration

    Swift

    public func documents(_ docs: [DocumentReference]) -> Pipeline

    Parameters

    docs

    An array of DocumentReference objects.

    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.

    Declaration

    Swift

    public func create(from query: Query) -> Pipeline

    Parameters

    query

    The Query to convert into a pipeline.

    Return Value

    A Pipeline that is equivalent to the given query.