saveDocument abstract method

FutureOr<bool> saveDocument(
  1. MutableDocument document, [
  2. ConcurrencyControl concurrencyControl = ConcurrencyControl.lastWriteWins

Saves a document to this collection, resolving conflicts through ConcurrencyControl.

When write operations are executed concurrently, the last writer will win by default. In this case the result is always true.

To fail on conflict instead, pass ConcurrencyControl.failOnConflict to concurrencyControl. In this case, if the document could not be saved the result is false. On success it is true.


FutureOr<bool> saveDocument(
  MutableDocument document, [
  ConcurrencyControl concurrencyControl = ConcurrencyControl.lastWriteWins,