我想讓最後添加的孩子在雲端功能。這是代碼。我想問是否有任何功能或查詢可用於獲取最後添加的孩子。 這是我的代碼:Firebase雲功能,獲取最後加入的孩子
exports.makeUppercase = functions.database.ref('aaa-fff/searchIndex')
.onWrite(event => {
// all records after the last continue to invoke this function
console.log(event.data.val());
console.log(event.data.numChildren());
});
PS。我不想循環兒童。
這是不是你所需要的東西,但我認爲它可以幫助你:HTTPS:/ /gist.github.com/MiroHibler/4740915 –