Firestore API - Class FieldPath (3.4.0)

public sealed class FieldPath : IEquatable<FieldPath>, IComparable<FieldPath>

Reference documentation and code samples for the Firestore API class FieldPath.

An immutable path of field names, used to identify parts of a document.

Inheritance

object > FieldPath

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Remarks

Ordering between field paths is primarily to provide canonical orderings for sets of paths, for example in a FieldMask. This ordering is performed segment-wise, using ordinal string comparisons.

Constructors

FieldPath(params string[])

public FieldPath(params string[] segments)

Creates a path from multiple segments. Each segment is treated verbatim: it may contain dots, which will lead to the segment being escaped in the path's string representation.

Parameter
NameDescription
segmentsstring

The segments of the path. This must not be null or empty, and it must not contain any null or empty elements.

Properties

DocumentId

public static FieldPath DocumentId { get; }

Sentinel field path to refer to the ID of a document. Used in queries to sort or filter by the document ID.

Property Value
TypeDescription
FieldPath

Methods

CompareTo(FieldPath)

public int CompareTo(FieldPath other)
Parameter
NameDescription
otherFieldPath
Returns
TypeDescription
int

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides