【发布时间】:2018-04-23 05:33:11
【问题描述】:
我正在结合谷歌的 Firestore 数据库编写云函数。
我正在尝试编写递归删除更多数据。我在数据库的其他部分找不到访问和删除数据的语法。 我已经拥有的代码如下。
exports.deleteProject = functions.firestore.document('{userID}/projects/easy/{projectID}').onDelete(event => {
// Get an object representing the document prior to deletion
// e.g. {'name': 'Marie', 'age': 66}
// console.log(event)
// console.log(event.data)
console.log(event.data.previous.data())
var deletedValue = event.data.previous.data();
});
我在这里找到了一些信息,但我没有时间在 atm 上检查它,如果我发现有用的东西我会修改问题。
https://firebase.google.com/docs/firestore/manage-data/delete-data?authuser=0
【问题讨论】:
标签: node.js google-cloud-platform google-cloud-firestore