Cloud Firestore Enterprise edition in Native mode is now available!Learn more.
Type functions Stay organized with collections Save and categorize content based on your preferences.
Preview:Firestore in Native mode (with Pipeline operations) for Enterpriseedition is subject to the "Pre-GA Offerings Terms" in the GeneralService Terms section of theService SpecificTerms. You can process personaldata for this feature as outlined in theCloud Data Processing Addendum, subjectto the obligations and restrictions described in the agreement under which youaccess Google Cloud. Pre-GA features are available "as is" and might havelimited support. For more information, see thelaunch stagedescriptions.
Type Functions
| Name | Description |
TYPE | Returns the type of the value as aSTRING. |
TYPE
Syntax:
type(input: ANY) -> STRINGDescription:
Returns a string representation of theinput type.
If given an absent value, returnsNULL.
Examples:
input | type(input) |
|---|---|
| NULL | "null" |
| true | "boolean" |
| 1 | "int32" |
| -3L | "int64" |
| 3.14 | "float64" |
| 2024-01-01T00:00:00Z UTC | "timestamp" |
| "foo" | "string" |
| b"foo" | "bytes" |
| [1, 2] | "array" |
| {"a": 1} | "map" |
path("c/d") | "reference" |
vector([1.0, 2.0]) | "vector" |
| ABSENT | NULL |
Client examples
Node.js
constresult=awaitdb.pipeline().collection("books").select(field("title").notEqual("1984").as("not1984")).execute();
Web
constresult=awaitexecute(db.pipeline().collection("books").select(field("title").notEqual("1984").as("not1984")));
Swift
letresult=tryawaitdb.pipeline().collection("books").select([Field("title").notEqual("1984").as("not1984")]).execute()
Kotlin
valresult=db.pipeline().collection("books").select(field("title").notEqual("1984").alias("not1984")).execute()
Java
Task<Pipeline.Snapshot>result=db.pipeline().collection("books").select(field("title").notEqual("1984").alias("not1984")).execute();
Python
fromgoogle.cloud.firestore_v1.pipeline_expressionsimportFieldresult=(client.pipeline().collection("books").select(Field.of("title").not_equal("1984").as_("not1984")).execute())
Java
Pipeline.Snapshotresult=firestore.pipeline().collection("books").select(notEqual(field("title"),"1984").as("not1984")).execute().get();
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-02-18 UTC.