-
Notifications
You must be signed in to change notification settings - Fork 407
Description
Hi,
My project is uses in node js code that using firebase-admin package.
According to business logic of my project I need use in transaction set mechanism of firestore but I can't receive the WriteResult of firestore like in the regular (non transaction) set.
Regular Set returns Promise with Write Time value.
I needs same value from firestore by transaction.set.
Can some one help me how can I receive it ? Maybe my approach isn't correct and you will be able help with another approach.
Node JS Code Sample:
transactionSetDocument(id, docContent)
{
return this.db.runTransaction(transaction =>
{
let docRef = this.db.collection('MyCollection').doc(${id});
transaction.set(docRef, docContent, { merge: true });
//set document doesn't return the Promise with WriteResult, so how can I obtain this data
}
}
Thanks,
Roman