docs-devsite/firestore_lite_pipelines.pipelinesource.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
Provides the entry point for defining the data source of a Firestore Pipeline<!-- -->.
Use the methods of this class (e.g., PipelineSource.collection()<!-- -->, PipelineSource.collectionGroup()<!-- -->, PipelineSource.database()<!-- -->, or PipelineSource.documents()<!-- -->) to specify the initial data for your pipeline, such as a collection, a collection group, the entire database, or a set of specific documents.
<b>Signature:</b>
export declare class PipelineSource<PipelineType>
| Method | Modifiers | Description |
|---|---|---|
| collection(collection) | Returns all documents from the entire collection. The collection can be nested. | |
| collection(options) | Returns all documents from the entire collection. The collection can be nested. | |
| collectionGroup(collectionId) | Returns all documents from a collection ID regardless of the parent. | |
| collectionGroup(options) | Returns all documents from a collection ID regardless of the parent. | |
| createFrom(query) | Convert the given Query into an equivalent Pipeline. | |
| database() | Returns all documents from the entire database. | |
| database(options) | Returns all documents from the entire database. | |
| documents(docs) | Set the pipeline's source to the documents specified by the given paths and DocumentReferences. | |
| documents(options) | Set the pipeline's source to the documents specified by the given paths and DocumentReferences. |
Returns all documents from the entire collection. The collection can be nested.
<b>Signature:</b>
collection(collection: string | Query): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| collection | string | Query | Name or reference to the collection that will be used as the Pipeline source. |
<b>Returns:</b>
PipelineType
Returns all documents from the entire collection. The collection can be nested.
<b>Signature:</b>
collection(options: CollectionStageOptions): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| options | CollectionStageOptions | Options defining how this CollectionStage is evaluated. |
<b>Returns:</b>
PipelineType
Returns all documents from a collection ID regardless of the parent.
<b>Signature:</b>
collectionGroup(collectionId: string): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| collectionId | string | ID of the collection group to use as the Pipeline source. |
<b>Returns:</b>
PipelineType
Returns all documents from a collection ID regardless of the parent.
<b>Signature:</b>
collectionGroup(options: CollectionGroupStageOptions): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| options | CollectionGroupStageOptions | Options defining how this CollectionGroupStage is evaluated. |
<b>Returns:</b>
PipelineType
Convert the given Query into an equivalent Pipeline.
<b>Signature:</b>
createFrom(query: Query): Pipeline;
| Parameter | Type | Description |
|---|---|---|
| query | Query | A Query to be converted into a Pipeline. |
<b>Returns:</b>
FirestoreError Thrown if any of the provided DocumentReferences target a different project or database than the pipeline.
Returns all documents from the entire database.
<b>Signature:</b>
database(): PipelineType;
<b>Returns:</b>
PipelineType
Returns all documents from the entire database.
<b>Signature:</b>
database(options: DatabaseStageOptions): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| options | DatabaseStageOptions | Options defining how a DatabaseStage is evaluated. |
<b>Returns:</b>
PipelineType
Set the pipeline's source to the documents specified by the given paths and DocumentReferences.
<b>Signature:</b>
documents(docs: Array<string | DocumentReference>): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| docs | Array<string | DocumentReference<!-- -->> | An array of paths and DocumentReferences specifying the individual documents that will be the source of this pipeline. The converters for these DocumentReferences will be ignored and not have an effect on this pipeline. |
<b>Returns:</b>
PipelineType
FirestoreError Thrown if any of the provided DocumentReferences target a different project or database than the pipeline.
Set the pipeline's source to the documents specified by the given paths and DocumentReferences.
<b>Signature:</b>
documents(options: DocumentsStageOptions): PipelineType;
| Parameter | Type | Description |
|---|---|---|
| options | DocumentsStageOptions | Options defining how this DocumentsStage is evaluated. |
<b>Returns:</b>
PipelineType
FirestoreError Thrown if any of the provided DocumentReferences target a different project or database than the pipeline.