PathOrSelector

Marker interface for types that implement both BsonPath and Selector.

These types are mainly found as return types in the BsonPath.Root object.

Properties

Link copied to clipboard
open val all: BsonPath

Points to all children of a document.

Link copied to clipboard
abstract val parent: BsonPath?

The parent path of this path: the same path without the last segment.

Functions

Link copied to clipboard
open fun any(vararg selectors: BsonPath.Selector): BsonPath

Allows specifying multiple selectors.

Link copied to clipboard

Applies the filters described by this path on the reader.

Link copied to clipboard

Applies the filters described by this path on the reader.

Link copied to clipboard
open operator fun get(index: Int): BsonPath

Points to the element at index in a BsonArray.

open operator fun get(field: String): BsonPath

Points to a field in a Bson document.

Link copied to clipboard
open fun reversed(): BsonPath

Iterates a BsonArray in the reversed order, starting from the end.

Link copied to clipboard
open fun sliced(range: IntProgression): BsonPath

Points to the elements of a BsonArray at the indices selected by range.

open fun sliced(start: Int? = null, end: Int? = null, step: Int = 1): BsonPath

Points to the elements of a BsonArray at the indices selected by start and end, with an optional step.