public sealed class SetOptions
Reference documentation and code samples for the Firestore API class SetOptions.
Immutable class representing options for Set operations.
Namespace
Google.Cloud.FirestoreAssembly
Google.Cloud.Firestore.dll
Properties
FieldMask
public IReadOnlyList<FieldPath> FieldMask { get; }
The fields to merge. This property is never null; if the mask is empty, all fields will be merged or overwritten.
Property Value | |
---|---|
Type | Description |
IReadOnlyListFieldPath |
Merge
public bool Merge { get; }
Whether or not to merge values. If FieldMask is non-empty,
this is always true
.
Property Value | |
---|---|
Type | Description |
bool |
MergeAll
public static SetOptions MergeAll { get; }
Returns an instance that merges all fields.
Property Value | |
---|---|
Type | Description |
SetOptions |
Overwrite
public static SetOptions Overwrite { get; }
Returns an instance that overwrites the target object. This is the default when no options are provided.
Property Value | |
---|---|
Type | Description |
SetOptions |
Methods
MergeFields(params FieldPath[])
public static SetOptions MergeFields(params FieldPath[] fieldMask)
Returns an instance that merges the given fields.
Parameter | |
---|---|
Name | Description |
fieldMask | FieldPath The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any null elements. |
Returns | |
---|---|
Type | Description |
SetOptions | An instance that merges the given fields. |
MergeFields(params string[])
public static SetOptions MergeFields(params string[] fieldMask)
Returns an instance that merges the given fields.
Parameter | |
---|---|
Name | Description |
fieldMask | string The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any empty or null elements. Each field is treated as a dot-separated list of segments. |
Returns | |
---|---|
Type | Description |
SetOptions | An instance that merges the given fields. |