Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.pathPathSegment

PathSegment

sealed class PathSegment

Single segment in a Path.

Each subclass represents a different type of segment that can appear in a path, and links to the high-level factory to obtain an instance of this path.

The high-level operators are only available in correct contexts to disambiguate multiple usages of the same operator. Subclasses of this type do not protect against these usages.

Inheritors

Types

AllPositional

data object AllPositional : PathSegment

Path segment for the "all positional" operator (.$[].).

Field

data class Field(val name: String) : PathSegment

Path segment representing the name of a field.

Indexed

data class Indexed(val index: Int) : PathSegment

Path segment representing an indexed element in an array.

Positional

data object Positional : PathSegment

Path segment for the "positional" operator (.$.).