replaceOne method
Future<WriteResult>
replaceOne(
- dynamic selector,
- Map<
String, dynamic> update, { - bool? upsert,
- WriteConcern? writeConcern,
- CollationOptions? collation,
- String? hint,
- Map<
String, Object> ? hintDocument,
Implementation
Future<WriteResult> replaceOne(selector, Map<String, dynamic> update,
{bool? upsert,
WriteConcern? writeConcern,
CollationOptions? collation,
String? hint,
Map<String, Object>? hintDocument}) async {
var replaceOneOperation = ReplaceOneOperation(
this,
ReplaceOneStatement(_selectorBuilder2Map(selector), update,
upsert: upsert,
collation: collation,
hint: hint,
hintDocument: hintDocument),
replaceOneOptions: ReplaceOneOptions(writeConcern: writeConcern));
return replaceOneOperation.executeDocument();
}