WriteResult

WriteResult

new WriteResult()

A WriteResult wraps the write time set by the Firestore servers on sets(), updates(), and creates().

Members

(readonly) writeTime :Timestamp

The write time as set by the Firestore servers.

Example
let documentRef = firestore.doc('col/doc');

documentRef.set({foo: 'bar'}).then(writeResult => {
  console.log(`Document written at: ${writeResult.writeTime.toDate()}`);
});

Methods

isEqual(other)

Returns true if this WriteResult is equal to the provided value.

Parameters:
Name Type Description
other *

The value to compare against.

WriteResult

new WriteResult(_writeTime)

Parameters:
Name Type Description
_writeTime

The time of the corresponding document write.

Members

(readonly) writeTime :Timestamp

The write time as set by the Firestore servers.

Example
let documentRef = firestore.doc('col/doc');

documentRef.set({foo: 'bar'}).then(writeResult => {
  console.log(`Document written at: ${writeResult.writeTime.toDate()}`);
});

Methods

isEqual(other)

Returns true if this WriteResult is equal to the provided value.

Parameters:
Name Type Description
other *

The value to compare against.