简体   繁体   English

Firebase Flutter:如何码头实时数据库嵌套数据列表

[英]Firebase Flutter: how to quay Real time database nested data list

i am trying to display all this shops inventory data and filter by category/name/price/etc..我正在尝试显示所有这些商店库存数据并按类别/名称/价格/等进行过滤。

  1. i can do this by using orderbyChild("Shop") and push all data in to list and display/filter data but with large user data that way can cause performance?我可以通过使用orderbyChild("Shop")并将所有数据推送到列表和显示/过滤数据来做到这一点,但是对于大量用户数据,这种方式会导致性能下降吗?
  2. is their better way to get all this shops data and filter using category /product name/price/etc...是他们获取所有这些商店数据并使用类别/产品名称/价格/等进行过滤的更好方法...

数据库

Firebase Realtime Database queries look for values at a fixed path under each direct child node of the path that you query. Firebase 实时数据库查询在您查询的路径的每个直接子节点下的固定路径中查找值。 They don't recursively search on all nodes under there.他们不会递归搜索下面的所有节点。 So, if you want to search across all shops, you'll have to (possibly additionally) store the data in a flat list.因此,如果您想搜索所有商店,则必须(可能另外)将数据存储在一个平面列表中。

Also see Firebase Query Double Nested另见Firebase 查询双重嵌套

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

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