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