public final class SetOptions extends Object
merge, mergeFields(java.util.List<java.lang.String>) and mergeFieldPaths(java.util.List<com.google.cloud.firestore.FieldPath>), the set()
calls in DocumentReference, WriteBatch and Transaction can be configured
to perform granular merges instead of overwriting the target documents in their entirety.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Returns true if this SetOptions is equal to the provided object.
|
int |
hashCode() |
static SetOptions |
merge()
Changes the behavior of set() calls to only replace the values specified in its data argument.
|
static SetOptions |
mergeFieldPaths(List<FieldPath> fields)
Changes the behavior of set() calls to only replace the fields under fieldPaths.
|
static SetOptions |
mergeFields(List<String> fields)
Changes the behavior of set() calls to only replace the fields under fieldPaths.
|
static SetOptions |
mergeFields(String... fields)
Changes the behavior of set() calls to only replace the fields under fieldPaths.
|
@Nonnull public static SetOptions merge()
@Nonnull public static SetOptions mergeFields(List<String> fields)
It is an error to pass a SetOptions object to a set() call that is missing a value for any of the fields specified here.
fields - The list of fields to merge. Fields can contain dots to reference nested fields
within the document.@Nonnull public static SetOptions mergeFields(String... fields)
It is an error to pass a SetOptions object to a set() call that is missing a value for any of the fields specified here.
fields - The list of fields to merge. Fields can contain dots to reference nested fields
within the document.@Nonnull public static SetOptions mergeFieldPaths(List<FieldPath> fields)
It is an error to pass a SetOptions object to a set() call that is missing a value for any of the fields specified here in its to data argument.
fields - The list of fields to merge.public boolean equals(Object obj)
Copyright © 2019 Google LLC. All rights reserved.