A WriteResult wraps the write time set by the Firestore servers on sets(), updates(), and creates().
WriteResult
Package
@google-cloud/firestoreConstructors
(constructor)(_writeTime)
constructor(_writeTime: Timestamp);Constructs a new instance of the WriteResult class
| Parameter | |
|---|---|
| Name | Description |
_writeTime |
Timestamp
The time of the corresponding document write. |
Properties
writeTime
get writeTime(): Timestamp;The write time as set by the Firestore servers.
{Timestamp} WriteResult#writeTime
let documentRef = firestore.doc('col/doc');
documentRef.set({foo: 'bar'}).then(writeResult => {
console.log(`Document written at: ${writeResult.writeTime.toDate()}`);
});
Methods
isEqual(other)
isEqual(other: firestore.WriteResult): boolean;Returns true if this WriteResult is equal to the provided value.
| Parameter | |
|---|---|
| Name | Description |
other |
firestore.WriteResult
The value to compare against. true if this |
| Returns | |
|---|---|
| Type | Description |
boolean |
|