在Firestore中保存数据后,是否有办法获得响应?

时间:2019-04-18 12:31:53

标签: python firebase google-cloud-firestore

我正在使用python在firestore中添加数据,我想从firestore中获取响应,以便我可以知道数据是否成功添加。有没有办法使用Python做到这一点?新手在这里。

我已经从其他资源中搜索了,但是找不到任何东西。

1 个答案:

答案 0 :(得分:0)

根据Firestore documentation in the codeDocumentReference.set()方法返回:

  

google.cloud.firestore_v1.types.WriteResult:对应于已提交文档的写入结果。写入结果包含一个update_time字段。

我找不到任何Python示例,但是它在这里应与Node.js版本类似:https://cloud.google.com/nodejs/docs/reference/firestore/1.2.x/WriteResult

相关问题