I have a realtime database on Firebase that has something like:
- Pets
- UNIQUE_ID
- name: Beethoven
- breed: Labrador,Golden
- category: Adoption, Temporally-adoption
- age: ...
- ...
Since I'm new on Firebase, I have few doubts on how to use Firebase database that I couldn't get a clue on their documentation, can you help me?
- I'm trying to create a Cloud Function (to be used as a REST API) where I could search across all pets from a particular category, for example, Adoption. Is that possible? I can create, update... but I don't see how I should do this search...
var ref = admin.database().ref('/pets'); ref.????
Can I create something similar as pagination from Cloud Functions against this search?
I'm not familiar with this type of NoSQL databases, but do I need to create an index to do those objects searchable? I'm completely lost here, too. :(
It is weird to use this Cloud functions to do this type of searches? Or should I use their own SDKs per each platform? Do they provide this searches too? Looks to me that it is easier to create a Cloud functions and call it from any platform as a rest call, right?
Thanks!