Skip to content

Type

class Type(val bsonType: BsonType, factory: BsonFactory) : Schema.SimpleConstraint<Any?> 

This property must have a value of the given bsonType.

Constructors

Type

constructor(bsonType: BsonType, factory: BsonFactory)

Properties

bsonType

name

val name: String

The name of this constraint.

Functions

toString

override fun toString(): String

JSON representation of this constraint object.

writeTo

override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.