tx
tx
gets specified documents first and manipulates them in succession.
delete field
await db.tx("users", "bob", ({ref, t, data}) => {
t.update(ref, {age: data.age + 10})
})
// equivalent firestore
await fb.runTransaction(async (t) => {
const ref = fb.collection("users").doc("bob")
const result = await t.get(ref)
const data = result.data()
t.update(ref, {age: data.age + 10})
})