VariantPath

class VariantPath(val steps: List<VariantPathStep>)

A location inside a document, as a list of steps from the root.

Paths are the unit everything above this module names data by: the catalog counts observations per path, an index is built for a path, and a query predicate applies to a path. Keeping them as a parsed list of steps rather than as a string means that comparison, prefixing and grouping are exact rather than textual — $["a.b"] and $.a.b are different locations and must never compare equal.

Constructors

Link copied to clipboard
constructor(steps: List<VariantPathStep>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

true for the path that selects the document itself.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
operator fun plus(other: VariantPath): VariantPath

This path extended by other's steps.

operator fun plus(step: VariantPathStep): VariantPath

This path extended by step.

Link copied to clipboard

This location in RFC 9535 §2.7's Normalized Path form: $['items'][0]['sku'].

Link copied to clipboard
open override fun toString(): String

The canonical expression for this path; parse round-trips it.