Skip to content

MaxProperties

class MaxProperties(val count: Int, factory: BsonFactory) : Schema.SimpleConstraint<Any> 

The maximum number of properties in an object (inclusive).

If the property does not contain an object, this constraint is ignored.

Constructors

MaxProperties

constructor(count: Int, factory: BsonFactory)

Properties

count

val count: Int

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.