OStack程序员社区-中国程序员成长平台

标题: Firebase query for data within a date range [打印本页]

作者: 菜鸟教程小白    时间: 2022-6-22 22:05
标题: Firebase query for data within a date range

My firebase data looks like this:

{
  "lambeosaurus": {
    "vacationDates" : "2016-12-20 - 2016-12-25",
    "length" : 12.5,
    "weight": 5000
  },
  "stegosaurus": {
    "vacationDates" : "2016-12-10 - 2016-12-20",
    "length" : 9,
    "weight" : 2500
  }
}

How do i query for all dinosaurs that will be away on vacation on 2016-12-20 (i.e it should return both lambeosaurus and stegosaurus)? Or should I actually store the data differently? If so, how should I store the data for optimum performance? Thanks.



Best Answer-推荐答案







欢迎光临 OStack程序员社区-中国程序员成长平台 (http://ostack.cn/) Powered by Discuz! X3.4