patch method

Future<void> patch(
  1. String collection,
  2. dynamic json,
  3. int id,
  4. [bool upsert = false]
)

Apply rfc6902/rfc6901 JSON patch to the document identified by id.

Implementation

Future<void> patch(String collection, dynamic json, int id, [bool upsert = false]) =>
    Future.sync(() => _mc.invokeMethod('patch', [
          _handle,
          collection,
          (json is! String) ? convert_lib.jsonEncode(json) : json as String,
          id,
          upsert
        ]).catchError(_errorHandler()));