Class FieldPath (2.3.1)

public sealed class FieldPath : IEquatable<FieldPath>, IComparable<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(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
Int32

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32
Overrides

ToString()

public override string ToString()
Returns
TypeDescription
String
Overrides