Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GetList query #253

Open
MarioSimou opened this issue Jan 14, 2023 · 3 comments
Open

Improve GetList query #253

MarioSimou opened this issue Jan 14, 2023 · 3 comments

Comments

@MarioSimou
Copy link

This is a suggestion around the GetList query.

Since the firebase SDK has native support counting documents within a collection, we can use this aggregation query to replace some parts of the existing functionality.

Currently, we make a call to firestore, retrieve the whole list of documents, and then manually filter and count any documents. Rather than calling firebase requesting all the documents within the collection, we can make a call that retrieve only the documents we need, and then count all the documents within the collection using the aggregation query. We can use the orderBy and limit methods available from the firebase sdk in order to apply in filtering and sorting.

@benwinding
Copy link
Owner

Very interesting, I wasn't aware of this new feature, it would greatly improve the LazyLoading function in this project.

Feel free to make a PR if you have time

@MarioSimou
Copy link
Author

I will do, most likely in a couple of weeks.

@murat0
Copy link

murat0 commented Jul 17, 2023

I will do, most likely in a couple of weeks.

Interested in the outcome - willing to help if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants