我试图根据时间限制查询我的Firebase。我用这个附加的跟踪。
问题是我得到了一个空白的firebaseArray。
var currentTime = (new Date).getTime();
var twentyFoursHoursAgo = currentTime - 86400000;
//scoresRef is defined as new Firebase(http://myfirebase.firebaseio.com/scores)
scoresRef.on('value', functio
我有一个从firebase firestore数据库获取信息的应用程序。此快照包含捕获的映像的name、co-ordinates、timestamp。
在应用程序中,我想根据DateTime对象的开始和结束日期过滤此快照。我的问题来自firebase,我有时间戳,但在flutter应用程序中,我有DateTime对象。如何使用这些DateTime对象过滤快照?
我对dart比较陌生,对这个问题感到非常困惑。
我的密码。
Example of a snapshot
[{capture_date: Timestamp(seconds=1622809815, nanoseconds=37126700
我在Firebase上运行一个web应用程序,我从实时数据库开始,现在我正在将我的数据迁移到firestore。 我使用admin SDK迁移了除时间戳以外的所有其他数据。在我的web应用程序中,当用户上传新内容时,代码会将时间戳添加到数据库中,这样内容就可以按时间排序。 问题是实时数据库和firestore显然在记录时间戳时使用了不同的方法: firebase.database.ServerValue.TIMESTAMP // This will be in the following format: 1577778747131
firebase.firestore.Timestamp.
我正在尝试创建一个搜索框,以查找不同类别的车辆,这里是我的数据库结构
我为检索数据而编写的代码
function AllDataSearch(searchBoxInput) {
firebase.database().ref('motorcycle').startAt(searchBoxInput).on('child_added', function (snapshot) {
showData(snapshot.val());
console.log("All Data Search1: