mobizt / Firebase-ESP32

[DEPRECATED]🔥 Firebase RTDB Arduino Library for ESP32. The complete, fast, secured and reliable Firebase Arduino client library that supports CRUD (create, read, update, delete) and Stream operations.
MIT License
415 stars 118 forks source link

Count fb collection entries? #73

Closed MartyMcFlyInTheSky closed 4 years ago

MartyMcFlyInTheSky commented 4 years ago

Hey mobizt

Is there a way get the count of entries within a firebase databank or a collection? If not, this would be a feature request.

I don't know if firebase provides an interface for that or if you have to download the whole thing as .json and count it out individually. In that case it would not make sense, as I'm limited in the amount of data I can transfer, so I want to keep it as minimal as possible. However the data I'm trying to push depends on how much data already IS stored in the firebase.

mobizt commented 4 years ago

The nodes count does not support in the Firebase RTDB as the data store as the JSON object.

You can filter data with these parameters e.g. orderBy, limitToFirst, limitToLast, startAt, endAt, and equalTo based on the name, value, and priority of nodes assigned to the orderBy parameter.