首页 > 解决方案 > 在 Firestore 服务器库上写入后读取

问题描述

Firestore 文档https://firebase.google.com/docs/firestore/transaction-data-contention说:

只有服务器客户端库支持在写操作后进行读操作的事务。

但是,在使用https://www.npmjs.com/package/@google-cloud/firestore 4.7.2写入后阅读时,我得到:

错误:Firestore 事务要求在所有写入之前执行所有读取。在 Transaction.get (/workspace/node_modules/@google-cloud/firestore/build/src/transaction.js:76:19)

是否真的支持在服务器库上写入后读取?

标签: google-cloud-firestore

解决方案


推荐阅读