Packagecom.myflashlab.air.extensions.firebase.firestore
Classpublic class SetOptions
InheritanceSetOptions Inheritance Object

An options object that configures the behavior of write() calls. By providing one of the SetOptions objects returned by merge() and mergeFields(String...). the write() calls in DocumentReference, WriteBatch and Transaction can be configured to perform granular merges instead of overwriting the target documents in their entirety.

Notice: mergeFields is not available on the iOS side.



Public Methods
 MethodDefined By
  
Initialize a new instance of this class.
SetOptions
  
merge():void
Changes the behavior of write() calls to only replace the values specified in its data argument.
SetOptions
  
mergeFields(... $fields):void
Changes the behavior of write() calls to only replace the fields under fieldPaths.
SetOptions
Constructor Detail
SetOptions()Constructor
public function SetOptions()

Initialize a new instance of this class.

Method Detail
merge()method
public function merge():void

Changes the behavior of write() calls to only replace the values specified in its data argument. Fields omitted from the write() call will remain untouched.

mergeFields()method 
public function mergeFields(... $fields):void

Changes the behavior of write() calls to only replace the fields under fieldPaths. Any field that is not specified in fieldPaths is ignored and remains untouched. It is an error to pass a SetOptions object to a write() call that is missing a value for any of the fields specified here in its to data argument.

Parameters

... $fields — The list of fields to merge. Fields can contain dots to reference nested fields within the document.