PipelineSource

@Beta
public final class PipelineSource


Start of a Firestore Pipeline

Summary

Public methods

final @NonNull Pipeline

Set the pipeline's source to the collection specified by the given path.

final @NonNull Pipeline

Set the pipeline's source to the collection specified by the given CollectionReference.

final @NonNull Pipeline

Set the pipeline's source to the collection specified by the given CollectionReference.

final @NonNull Pipeline

Set the pipeline's source to the collection group with the given id.

final @NonNull Pipeline
collectionGroup(
    @NonNull String collectionId,
    @NonNull CollectionGroupOptions options
)

Set the pipeline's source to the collection group with the given id.

final @NonNull Pipeline

Convert the given Aggregate Query into an equivalent Pipeline.

final @NonNull Pipeline

Convert the given Query into an equivalent Pipeline.

final @NonNull Pipeline

Set the pipeline's source to be all documents in this database.

final @NonNull Pipeline

Set the pipeline's source to the documents specified by the given DocumentReferences.

final @NonNull Pipeline
documents(@NonNull String documents)

Set the pipeline's source to the documents specified by the given paths.

Public methods

collection

public final @NonNull Pipeline collection(@NonNull String path)

Set the pipeline's source to the collection specified by the given path.

Parameters
@NonNull String path

A path to a collection that will be the source of this pipeline.

Returns
@NonNull Pipeline

A new Pipeline object with documents from target collection.

collection

public final @NonNull Pipeline collection(@NonNull CollectionReference ref)

Set the pipeline's source to the collection specified by the given CollectionReference.

Parameters
@NonNull CollectionReference ref

A CollectionReference for a collection that will be the source of this pipeline.

Returns
@NonNull Pipeline

A new Pipeline object with documents from target collection.

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

Thrown if the ref provided targets a different project or database than the pipeline.

collection

public final @NonNull Pipeline collection(
    @NonNull CollectionReference ref,
    @NonNull CollectionSourceOptions options
)

Set the pipeline's source to the collection specified by the given CollectionReference.

Parameters
@NonNull CollectionReference ref

A CollectionReference for a collection that will be the source of this pipeline.

@NonNull CollectionSourceOptions options

CollectionSourceOptions for the collection.

Returns
@NonNull Pipeline

A new Pipeline object with documents from target collection.

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

Thrown if the ref provided targets a different project or database than the pipeline.

collectionGroup

public final @NonNull Pipeline collectionGroup(@NonNull String collectionId)

Set the pipeline's source to the collection group with the given id.

Parameters
@NonNull String collectionId

The id of a collection group that will be the source of this pipeline.

Returns
@NonNull Pipeline

A new Pipeline object with documents from target collection group.

collectionGroup

public final @NonNull Pipeline collectionGroup(
    @NonNull String collectionId,
    @NonNull CollectionGroupOptions options
)

Set the pipeline's source to the collection group with the given id.

Parameters
@NonNull String collectionId

The id of a collection group that will be the source of this pipeline.

@NonNull CollectionGroupOptions options

CollectionGroupOptions for the collection group.

Returns
@NonNull Pipeline

A new Pipeline object with documents from target collection group.

createFrom

public final @NonNull Pipeline createFrom(@NonNull AggregateQuery aggregateQuery)

Convert the given Aggregate Query into an equivalent Pipeline.

Parameters
@NonNull AggregateQuery aggregateQuery

An Aggregate Query to be converted into a Pipeline.

Returns
@NonNull Pipeline

A new Pipeline object that is equivalent to aggregateQuery

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

Thrown if the aggregateQuery provided targets a different project or database than the pipeline.

createFrom

public final @NonNull Pipeline createFrom(@NonNull Query query)

Convert the given Query into an equivalent Pipeline.

Parameters
@NonNull Query query

A Query to be converted into a Pipeline.

Returns
@NonNull Pipeline

A new Pipeline object that is equivalent to query

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

Thrown if the query provided targets a different project or database than the pipeline.

database

public final @NonNull Pipeline database()

Set the pipeline's source to be all documents in this database.

Returns
@NonNull Pipeline

A new Pipeline object with all documents in this database.

documents

public final @NonNull Pipeline documents(@NonNull DocumentReference documents)

Set the pipeline's source to the documents specified by the given DocumentReferences.

Parameters
@NonNull DocumentReference documents

DocumentReferences specifying the individual documents that will be the source of this pipeline.

Returns
@NonNull Pipeline

Pipeline with documents.

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

Thrown if the documents provided targets a different project or database than the pipeline.

documents

public final @NonNull Pipeline documents(@NonNull String documents)

Set the pipeline's source to the documents specified by the given paths.

Parameters
@NonNull String documents

Paths specifying the individual documents that will be the source of this pipeline.

Returns
@NonNull Pipeline

A new Pipeline object with documents.