samuelgozi/firebase-firestore-lite

Transform in Transactions

Closed this issue · 8 comments

I'm doing this inside a transaction:
tx.update(`counter/${auth.user.localId}`, { registos: new Transform('increment', 1) });

It doesn't increment after i commit.
The following code works just fine (just to make sure the problem was inside the transaction):

await db.reference(`counter/${auth.user.localId}`).update({registos: new Transform('increment',1)})

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

Sorry I was sure I answered that.
I completely forgot to add this feature to transactions.
I'll try to make a quick fix on the next few days, or ill release a new beta that fixes this and let you know.

Ok. I published a quick fix in v0.7.4, please let me know If something's wrong.
As for the beta, I'll publish a full refactor as soon as I can. I should have finished it already but didn't have much time for it last week.

Please let me know if it works so that I can close this issue.

I can't try it right now but i'm using the beta. You only fixed the master right?
Anyway thanks and i'll try it out as soon as i can.

I have a working version on the beta too, but because I’m refactoring 80% of the code o didn’t release it yet because I don’t have the tests set up correctly yet

yeah don't worry man, take your time! The 1.0 it's gonna be great.

I hope 😬