patch method

Future<void> patch(
  1. {@required Map<String, Object> data,
  2. Reach reach}
)

Patches the document.

Optional parameter reach can be used to specify the minimum level of authority needed. For example:

  • Reach.local tells that the write only needs to reach the local database (which may synchronized with the global database later).
  • Reach.global tells that the write should reach the global master database.

Implementation

Future<void> patch({
  @required Map<String, Object> data,
  Reach reach,
}) {
  return DocumentUpdateRequest(
    document: this,
    data: data,
    isPatch: true,
    reach: reach,
  ).delegateTo(parentDatabase.adapter);
}