BsonValueReader

Representation of a BSON value.

See the type to know which accessor to use. All other accessors will fail with a BsonReaderException.

To obtain instances of this interface, see BsonDocumentReader.read and BsonArrayReader.read.

Implementation constraints

Different implementations of BsonValueReader should be considered equal if they represent the same value, with the same type. That is, both values would result in the exact same BSON sent over the wire. The methods BsonValueReader.Companion.equals and BsonValueReader.Companion.hashCode are provided to facilitate implementation.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val type: BsonType

The type of this value.

Functions

Link copied to clipboard

Analyzes the difference between two BSON values.

Link copied to clipboard
abstract fun <T : Any> read(type: KType, klass: KClass<T>): T?

Reads this reader into an instance of type.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun readDateTime(): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun readDouble(): Double
Link copied to clipboard

Reads an Instant. Conversion function on top of readDateTime.

Link copied to clipboard
abstract fun readInt32(): Int
Link copied to clipboard
abstract fun readInt64(): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun readMaxKey()
Link copied to clipboard
abstract fun readMinKey()
Link copied to clipboard
abstract fun readNull()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun readString(): String
Link copied to clipboard
abstract fun readSymbol(): String
Link copied to clipboard
Link copied to clipboard
abstract fun readUndefined()
Link copied to clipboard
abstract override fun toString(): String

JSON representation of this value.