0
我想通过火力地堡看起来并检查是否存在对孩子一定的值,如果这个值不存在。我想打印出来的一份声明打印出火力子值
databaseRef.child("books").queryOrdered(byChild: "Category").queryEqual(toValue: categorySegue).observe(.childAdded, with: { (snapshot) in
if snapshot.exists() {
print("data found")
}else{
print("no data found")
}
})
当孩子值存在,它打印出的数据发现完全正常,但是当它不存在。它不会打印出任何数据发现