How Do I Utilize Filters And Child Elements In Google Firebase Database
Working on an Android app that is using the new Firebase Database framework. It has data objects that are modeled like this: Where the Top parent (1234-4321) is the 'chat room', t
Solution 1:
I would try to explain you the basic use of filtering in these examples:
//getting first two chat rooms
QuerychatRoomsQuery= databaseReference.limitToLast(2);
//getting last two chat rooms
QuerychatRoomsQuery= databaseReference.limitToFirst(2)
//getting all active id
QuerychatRoomsQuery= databaseReference.orderByChild("active").equalTo(true);
This is just a basic sample I would encourage you to go through this blog. Which explains advanced queries amazingly.
Alternatively, you can also go through these docs. They are different than what you shared.
Do let me know if this is what you were looking for.
Post a Comment for "How Do I Utilize Filters And Child Elements In Google Firebase Database"