I have this data structure, where todos are organized to follow path /todos/uid/
{
\"metausers\" : {
\"simplelogin:1\" : {
\"displayName\" : \"Jo
There are no WHERE clauses in Firebase. Check out this thread for some great structural tips on searching by multiple fields, this thread on database style queries, this blog on queries, and the docs.
Your first approach should be to segment data how it will be read back. Something like the following:
/todos/public
/todos/private
/todos/completed
You can also utilize priorities as explained in the docs. Then fetch items based on priority.
If the list is less than a thousand, which it should be if data is properly partitioned, you can probably just grab the todo list and filter it at the client as well--a great option for short collections like this, particularly when working with a great binding lib like Angular.