public sealed class Precondition
Immutable class representing a precondition for an update operation.
Namespace
Google.Cloud.FirestoreAssembly
Google.Cloud.Firestore.dll
Properties
Exists
public bool? Exists { get; }
True if the document must exist; false if the document must not exist. If this is non-null, LastUpdateTime will be null.
Property Value | |
---|---|
Type | Description |
Nullable<Boolean> |
LastUpdateTime
public Timestamp? LastUpdateTime { get; }
Condition that the document was last updated at the specified timestamp, if specified. If this is non-null, Exists will be null.
Property Value | |
---|---|
Type | Description |
Nullable<Timestamp> |
MustExist
public static Precondition MustExist { get; }
Precondition that the document must exist, but with any last update time.
Property Value | |
---|---|
Type | Description |
Precondition |
None
public static Precondition None { get; }
No precondition.
Property Value | |
---|---|
Type | Description |
Precondition |
Methods
LastUpdated(Timestamp)
public static Precondition LastUpdated(Timestamp timestamp)
Creates a precondition that the document has the specified last update time.
Parameter | |
---|---|
Name | Description |
timestamp | Timestamp |
Returns | |
---|---|
Type | Description |
Precondition |