简体   繁体   English

相当于 Firebase 实时数据库中的 DocumentSnapshot

[英]Equivalent of DocumentSnapshot in Firebase RealTime Database

DocumentSnapshot is for Firestore right? DocumentSnapshot 适用于 Firestore,对吧? Is there any equivalent of DocumentSnapshot in Firebase RealTimeDatabase? Firebase RealTimeDatabase 中是否有任何等效的 DocumentSnapshot? Becasue i'll use it in my FirebaseRecyclerAdapter for recyclerview items to have an onclcick events on each items.因为我会在我的 FirebaseRecyclerAdapter 中使用它来让 recyclerview 项目在每个项目上都有一个 onclcick 事件。

A DocumentSnapshot in Firestore is a snapshot of the data in a document, which is the basic unit of data storage in that database. Firestore 中的DocumentSnapshot是文档中数据的快照,是该数据库中数据存储的基本单位。

The equivalent on Firebase's Realtime Database would be a DataSnapshot , which contains the data for a node - the basic unit of data storage for that database. Firebase 实时数据库的等效项是DataSnapshot ,它包含节点的数据——数据库的基本数据存储单元。 DataSnapshots are also what the FirebaseRecyclerAdapter class in the FirebaseUI library uses to track the current snapshots of the data. DataSnapshots也是FirebaseUI 库中的FirebaseRecyclerAdapter class用来跟踪数据当前快照的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM