PipelineResult class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

A PipelineResult contains data read from a Firestore Pipeline. The data can be extracted with thePipelineResult.data() orPipelineResult.get() methods.

If the PipelineResult represents a non-document result,ref will return a undefined value.

Signature:

exportdeclareclassPipelineResult<AppModelType=DocumentData>

Properties

PropertyModifiersTypeDescription
createTimeTimestamp | undefined(Public Preview) The time the document was created. Undefined if this result is not a document.
idstring | undefined(Public Preview) The ID of the document for which this PipelineResult contains data, if it is a document; otherwiseundefined.
refDocumentReference | undefined(Public Preview) The reference of the document, if it is a document; otherwiseundefined.
updateTimeTimestamp | undefined(Public Preview) The time the document was last updated (at the time the snapshot was generated). Undefined if this result is not a document.

Methods

MethodModifiersDescription
data()(Public Preview) Retrieves all fields in the result as an object.
get(fieldPath)(Public Preview) Retrieves the field specified byfield.

PipelineResult.createTime

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The time the document was created. Undefined if this result is not a document.

Signature:

getcreateTime():Timestamp|undefined;

PipelineResult.id

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The ID of the document for which this PipelineResult contains data, if it is a document; otherwiseundefined.

Signature:

getid():string|undefined;

PipelineResult.ref

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The reference of the document, if it is a document; otherwiseundefined.

Signature:

getref():DocumentReference|undefined;

PipelineResult.updateTime

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The time the document was last updated (at the time the snapshot was generated). Undefined if this result is not a document.

Signature:

getupdateTime():Timestamp|undefined;

PipelineResult.data()

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Retrieves all fields in the result as an object.

Signature:

data():AppModelType;

Returns:

AppModelType

An object containing all fields in the document or 'undefined' if the document doesn't exist.

Example

letp=firestore.pipeline().collection('col');p.execute().then(results=>{letdata=results[0].data();console.log(`Retrieved data:${JSON.stringify(data)}`);});

PipelineResult.get()

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Retrieves the field specified byfield.

Signature:

get(fieldPath:string|FieldPath|Field):any;

Parameters

ParameterTypeDescription
fieldPathstring |FieldPath |Field

Returns:

any

The data at the specified field location orundefined if no such field exists.

Example

letp=firestore.pipeline().collection('col');p.execute().then(results=>{letfield=results[0].get('a.b');console.log(`Retrieved field value:${field}`);});

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-15 UTC.