Skip to content

Kotlin BSON • Multiplatform abstraction for different BSON implementationsopensavvy.ktmongo.bsonBsonPathRoot

Root

object Root : BsonPath

The root of a BsonPath expression.

All BSON paths start at the root. For example, BsonPath["foo"] refers to the field "foo".

For more information, see BsonPath.

Functions

findIn

@LowLevelApi
open override fun findIn(reader: BsonValueReader): Sequence<BsonValueReader>

get

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.

parse

fun parse(@Language
(value = "JSONPath") text: String): BsonPath

Parses an RFC-9535 compliant string expression into a BsonPath instance.

toString

open override fun toString(): String