addToSet

@JvmName(name = "addToSetExt")
infix fun <T> KProperty<Iterable<T>?>.addToSet(value: T): Bson

Creates an update that adds the given value to the array value of the property, unless the value is already present, in which case it does nothing

Return

the update @mongodb.driver.manual reference/operator/update/addToSet/ $addToSet

Parameters

value

the value

the value type

fun <T> addToSet(property: KProperty<Iterable<T>?>, value: T): Bson

Creates an update that adds the given value to the array value of the property, unless the value is already present, in which case it does nothing

Return

the update @mongodb.driver.manual reference/operator/update/addToSet/ $addToSet

Parameters

property

the property

value

the value

the value type