mercredi 28 février 2018

swift + firebase + query random object + sequential ID

I'm looking for an easy way to query my database in firebase using swift to retrieve a random object. I've read a lot of threads and there doesn't seem to be an easy way. One example showed it can be done be creating a sequential number but there's no information on how to create this sequential number for each record.

So either I need information on how to create a sequential number each time a record is created or if someone knows an easy way to retrieve a random record from a database that would be very helpful. In swift preferably.

My Database structure:

database structure




Aucun commentaire:

Enregistrer un commentaire