BsonDocument

fun BsonDocument(initialCapacity: Int)

Construct an empty document with the specified initial capacity.

Parameters

initialCapacity

the initial capacity


fun BsonDocument(key: String, value: BsonValue)

Construct a new instance with a single key value pair

Parameters

key

the key

value

the value


fun BsonDocument(bsonElements: List<BsonElement>)

Construct a new instance with the given list BsonElements

Parameters

bsonElements

the initial list of BsonElements


fun BsonDocument(vararg pairs: Pair<String, BsonValue>)

Construct a new instance with the varargs of key value pairs

Parameters

pairs

the initial pairs of values


fun BsonDocument(initial: Map<String, BsonValue> = LinkedHashMap())

constructs the bson document with the initial values, defaults to an empty document

Parameters

initial

the initial values