saveDocumentWithConflictHandlerSync abstract method

  1. @Deprecated('Use defaultCollection.saveDocumentWithConflictHandlerSync instead.')
bool saveDocumentWithConflictHandlerSync(
  1. MutableDocument document,
  2. SyncSaveConflictHandler conflictHandler
)

Saves a document to this database, resolving conflicts with an sync conflictHandler.

When write operations are executed concurrently and if conflicts occur, the conflictHandler will be called. Use the conflict handler to directly edit the Document to resolve the conflict. When the conflict handler returns true, the save method will save the edited document as the resolved document. If the conflict handler returns false, the save operation will be canceled with false as the result. If the conflict handler returns true or there is no conflict the result is true.

Implementation

@Deprecated(
  'Use defaultCollection.saveDocumentWithConflictHandlerSync instead.',
)
bool saveDocumentWithConflictHandlerSync(
  MutableDocument document,
  SyncSaveConflictHandler conflictHandler,
);