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
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
Type | Description |
---|---|
Timestamp |
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.
Name | Description |
other | firestore.WriteResult
The value to compare against. true if this |
Type | Description |
---|---|
boolean |