Path

data class Path(val segment: PathSegment, val parent: Path?)(source)

Low-level, type-unsafe pointer to a specific field in a document.

A path is a string pointer that identifies which field(s) are impacted by an operator.

For example, the following are valid paths:

  • "foo": targets the field "foo",

  • "foo.bar": targets the field "bar" which is part of the object "foo",

  • "arr.$5.bar": targets the field "bar" which is part of the item with index 5 in the array "arr".

This structure is a singly-linked list representing the entire path. Each segment is represented by PathSegment.

Constructors

Link copied to clipboard
constructor(segment: PathSegment, parent: Path?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val parent: Path?
Link copied to clipboard

Functions

Link copied to clipboard
fun asSequence(): <Error class: unknown class><PathSegment>
Link copied to clipboard
operator fun Path.div(path: Path): Path

Returns a new Path instance that is the concatenation of the current path and a child path.

operator fun Path.div(segment: PathSegment): Path

Returns a new Path instance that is the concatenation of the current path and a segment.

Link copied to clipboard
open override fun toString(): <Error class: unknown class>