UpsertResult¶
interface UpsertResult : UpdateOperations.UpdateResult
The return value of upsertOne.
Properties¶
acknowledged¶
abstract val acknowledged: Boolean
true if the update was acknowledged.
To control whether the update is acknowledged, see UpdateOptions.writeConcern.
If the update was not acknowledged, this property returns false and all properties throw UnsupportedOperationException.
matchedCount¶
abstract val matchedCount: Long
The number of matched documents.
Throws
UnsupportedOperationException-
If the update was not
acknowledged.
modifiedCount¶
abstract val modifiedCount: Long
The number of modified documents.
If this update created new documents (e.g., with upsertOne), they are not counted by this field: they did not already exist, so they were not modified.
Throws
UnsupportedOperationException-
If the update was not
acknowledged.
upsertedCount¶
abstract val upsertedCount: Int
The number of upserted documents.
Throws
UnsupportedOperationException-
If the update was not
acknowledged.
upsertedId¶
abstract val upsertedId: BsonValueReader?
The _id of the upserted document, if any.
If this request modified an existing document, contains null.
Throws
UnsupportedOperationException-
If the update was not
acknowledged.