-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: Querying all trips from all accounts #391
Conversation
BundleMonUnchanged files (4)
Total files change +5B 0% Final result: ✅ View report in BundleMon website ➡️ |
{ endDate: 'desc' } | ||
]) | ||
.select(['startDate', 'endDate', 'title', 'aggregation']) | ||
.indexFields(['startDate', 'endDate']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The endDate
does not seem necessary ? I guess the sort on startDate
is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary to have the endDate
in the app(for duration trip calculations at least), but indeed it is not useful in the .sortBy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if it's not useful in the sortBy, it's not useful in the indexField either ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seen together, pending the correction of this issue cozy/cozy-client#1216, endDate
cannot be removed from the indexFields
fb98b25
to
d90cb14
Compare
This query should not sort the accounts, because since there is a limitBy we can run into a case where we don't see all the latest trips. The presence in the .select is not necessary either.
This query should not sort the accounts, because since there is a limitBy, we can run into a case where we don't see all the latest trips.
The presence in the .select is not necessary either.