modernUpdate method
Future<Map<String, dynamic> >
modernUpdate(
- dynamic selector,
- dynamic update, {
- bool? upsert,
- bool? multi,
- WriteConcern? writeConcern,
- CollationOptions? collation,
- List? arrayFilters,
- String? hint,
- Map<
String, Object> ? hintDocument,
Implementation
Future<Map<String, dynamic>> modernUpdate(selector, update,
{bool? upsert,
bool? multi,
WriteConcern? writeConcern,
CollationOptions? collation,
List<dynamic>? arrayFilters,
String? hint,
Map<String, Object>? hintDocument}) async {
var updateOperation = UpdateOperation(
this,
[
UpdateStatement(_selectorBuilder2Map(selector),
update is List ? update : _updateBuilder2Map(update),
upsert: upsert,
multi: multi,
collation: collation,
arrayFilters: arrayFilters,
hint: hint,
hintDocument: hintDocument)
],
updateOptions: UpdateOptions(writeConcern: writeConcern));
return updateOperation.execute();
}