4 ms·
Having played with the Firebase Python client, outstanding writes within a transaction are "kind of" exposed because you fetch the document, and make alteration
by sargun 5y ago
Having played with the Firebase Python client, outstanding writes within a transaction are "kind of" exposed because you fetch the document, and make alterations to it before saving it (within a "transaction"). That object, when you make alterations to it, bubbles up the changes -- AFAICT, this is a bit of client side hack, but it's ergonomically wonderful.
- evanweaver 5y agoI guess most ORMs are like that. Is the object shared by reference across the entire runtime or do you end up with divergent objects?
- sargun 5y agoIt's only valid in the context of that function invocation. The docs say not to write impure functions or do anything with concurrency -- if you start two simultaneous transactions, the client isn't "smart" about it unfortunately.