update

fun update(closure: (List<DittoMutableDocument>) -> Unit): Map<DittoDocumentId, List<DittoUpdateResult>>

Update documents that match the query generated by the preceding function chaining.

Return

a dictionary of document IDs to lists of DittoUpdateResult that describes the updates that were performed for each document.

Parameters

closure

a closure that gets called with all of the documents matching the query. The documents are DittoMutableDocuments so you can call update-related functions on them.


fun update(updater: DittoMutableDocumentsUpdater): Map<DittoDocumentId, List<DittoUpdateResult>>

Update documents that match the query generated by the preceding function chaining.

Return

a dictionary of document IDs to lists of DittoUpdateResult that describes the updates that were performed for each document.

Parameters

updater

an object that implements DittoMutableDocumentsUpdater, whose update function gets called with all of the documents matching the query. The documents are DittoMutableDocuments so you can call update-related functions on them.