samedi 27 novembre 2021

How to get random keys in Firebase Database without fetching all data from a reference node?

I'm trying to get random keys from my Firebase Database which is a set of questions but all the solutions I found so far suggested fetching all the data first then getting the size and selecting random keys from that data. I want to know if it's possible to do that without having to fetch all data considering that the set could get larger.

I thought of saving the keys to another node and fetching that node only and then using those selected keys, I can get only the questions I need thus reducing unnecessary data but would that even make sense?




Aucun commentaire:

Enregistrer un commentaire