PipelineSource

@Beta
class PipelineSource


Start of a Firestore Pipeline

Summary

Public functions

Pipeline

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

Pipeline

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

Pipeline

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

Pipeline
collectionGroup(collectionId: String)

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

Pipeline
collectionGroup(collectionId: String, options: CollectionGroupOptions)

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

Pipeline
createFrom(aggregateQuery: AggregateQuery)

Convert the given Aggregate Query into an equivalent Pipeline.

Pipeline
createFrom(query: Query)

Convert the given Query into an equivalent Pipeline.

Pipeline

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

Pipeline
documents(vararg documents: DocumentReference)

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

Pipeline
documents(vararg documents: String)

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

Public functions

collection

fun collection(path: String): Pipeline

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

Parameters
path: String

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

Returns
Pipeline

A new Pipeline object with documents from target collection.

collection

fun collection(ref: CollectionReference): Pipeline

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

Parameters
ref: CollectionReference

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

Returns
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

fun collection(ref: CollectionReference, options: CollectionSourceOptions): Pipeline

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

Parameters
ref: CollectionReference

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

options: CollectionSourceOptions

CollectionSourceOptions for the collection.

Returns
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

fun collectionGroup(collectionId: String): Pipeline

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

Parameters
collectionId: String

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

Returns
Pipeline

A new Pipeline object with documents from target collection group.

collectionGroup

fun collectionGroup(collectionId: String, options: CollectionGroupOptions): Pipeline

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

Parameters
collectionId: String

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

options: CollectionGroupOptions

CollectionGroupOptions for the collection group.

Returns
Pipeline

A new Pipeline object with documents from target collection group.

createFrom

fun createFrom(aggregateQuery: AggregateQuery): Pipeline

Convert the given Aggregate Query into an equivalent Pipeline.

Parameters
aggregateQuery: AggregateQuery

An Aggregate Query to be converted into a Pipeline.

Returns
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

fun createFrom(query: Query): Pipeline

Convert the given Query into an equivalent Pipeline.

Parameters
query: Query

A Query to be converted into a Pipeline.

Returns
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

fun database(): Pipeline

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

Returns
Pipeline

A new Pipeline object with all documents in this database.

documents

fun documents(vararg documents: DocumentReference): Pipeline

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

Parameters
vararg documents: DocumentReference

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

Returns
Pipeline

Pipeline with documents.

Throws
kotlin.IllegalArgumentException: kotlin.IllegalArgumentException

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

documents

fun documents(vararg documents: String): Pipeline

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

Parameters
vararg documents: String

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

Returns
Pipeline

A new Pipeline object with documents.