Skip to content

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

BsonType

The different data types supported in BSON documents.

External resources

Entries

Double

String

Document

Array

BinaryData

Undefined

ObjectId

Boolean

Datetime

Null

RegExp

DBPointer

JavaScript

Symbol

JavaScriptWithScope

Int32

Timestamp

Int64

Decimal128

MinKey

MaxKey

Types

Companion

object Companion

Properties

code

val code: Byte

The byte identifier for this particular type.

entries

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name

val name: String

ordinal

val ordinal: Int

Functions

valueOf

fun valueOf(value: String): BsonType

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values

Returns an array containing the constants of this enum type, in the order they're declared.