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.
Represents a reference to a field in a Firestore document, or outputs of a Pipeline stage.
Field references are used to access document field values in expressions and to specify fields for sorting, filtering, and projecting data in Firestore pipelines.
You can create a Field instance using the static method:
Signature:
export declare class Field extends Expression implements Selectable
Extends: Expression
Implements: Selectable
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| alias | string | (Public Preview) | |
| expr | Expression | (Public Preview) | |
| expressionType | ExpressionType | (Public Preview) | |
| fieldName | string | (Public Preview) | |
| selectable | true | (Public Preview) |
Field.alias
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.
Signature:
get alias(): string;
Field.expr
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.
Signature:
get expr(): Expression;
Field.expressionType
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.
Signature:
readonly expressionType: ExpressionType;
Field.fieldName
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.
Signature:
get fieldName(): string;
Field.selectable
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.
Signature:
selectable: true;
Example
// Create a Field instance for the 'name' field
const nameField = field("name");
// Create a Field instance for a nested field 'address.city'
const cityField = field("address.city");