In part 9 of the Firestore tutorial we filter our queries by calling a where method on our CollectionReference, like whereEqualTo or whereGreaterThanOrEqualTo. Into these methods we pass the key of the field in the document, and the value we want to filter for.
We can also order these results with the orderBy method, where we can pass Query.Direction.DESCENDING to get our results in descending instead of ascending order.
Lastly we will use the limit method to only retrieve a certain number of results.
We can add all these queries before the get method or before the addSnapshotListener method.
Watch the whole playlist:
Code for this part:
💻 Find the BEST programming tutorials on TutHub:
⭐ Get my MVVM Caching Course now:
❗ Subscribe to the channel:
📨 Subscribe to the Coding in Flow newsletter:
❓ Join our free developer community:
📣 Follow Coding in Flow on other sites:
💰 Business requests, sponsoring, etc.: firstname.lastname@example.org