Package com.google.cloud.firestore
Class FieldPath
- All Implemented Interfaces:
Comparable<FieldPath>
A
FieldPath refers to a field in a document. The path may consist of a single field name
(referring to a top level field in the document), or a list of field names (referring to a nested
field in the document).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldPathA special sentinel to refer to the ID of a document.static FieldPathfromDotSeparatedString(String field) Returns a field path from a dot separated string.static FieldPathfromServerFormat(String path) Creates aFieldPathfrom a server-encoded field path.static FieldPathCreates a FieldPath from the provided field names.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
FieldPath
public FieldPath()
-
-
Method Details
-
of
Creates a FieldPath from the provided field names. If more than one field name is provided, the path will point to a nested field in a document.- Parameters:
fieldNames- A list of field names.- Returns:
- A
FieldPaththat points to a field location in a document.
-
documentId
A special sentinel to refer to the ID of a document. It can be used in queries to sort or filter by the document ID. -
fromDotSeparatedString
Returns a field path from a dot separated string. Does not support escaping. -
fromServerFormat
Creates aFieldPathfrom a server-encoded field path.Copied from Firebase Android SDK: https://github.com/firebase/firebase-android-sdk/blob/2d3b2be7d2d00d693eb74986f20a6265c918848f/firebase-firestore/src/main/java/com/google/firebase/firestore/model/FieldPath.java#L47
-
toString
-