RepsertOne
class RepsertOne<Document : Any> : AbstractBsonNode, Command, AvailableInBulkWrite<Document> (source)
Replaces a single element in a collection, or inserts it if it doesn't exist.
Example
users.replaceOrInsertOne({ User::name eq "foo" }, User("Bob", 15))
Content copied to clipboard
External resources
See also
Filter operators
Functions
Link copied to clipboard
Returns a simplified (but equivalent) expression to the current expression.
Link copied to clipboard
Writes the result of simplifying to a new Bson.
Link copied to clipboard
Writes the result of simplifying this expression into writer.