FirebaseFirestore Framework Reference

Transaction

Writes to the document referred to by document. If the document doesn’t yet exist,
this method creates it and then sets the data. If the document exists, this method overwrites
the document data with the new values.

Return Value

Writes to the document referred to by document. If the document doesn’t yet exist,
this method creates it and then sets the data. If you pass merge:YES, the provided data will be
merged into any existing document.

Return Value

Writes to the document referred to by document and only replace the fields
specified under mergeFields. Any field that is not specified in mergeFields
is ignored and remains untouched. If the document doesn’t yet exist,
this method creates it and then sets the data.

It is an error to include a field in mergeFields that does not have a corresponding
value in the data dictionary.