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

feat: support sortBy on joined table #1327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlecoq
Copy link
Contributor

@mlecoq mlecoq commented May 17, 2022

Currently if we make a query with joined tables, we cannot sort on columns of joined tables.

The goal of this PR is to be able to indicate on which table sort is applied

@radex
Copy link
Collaborator

radex commented May 23, 2022

Looks nice, but please either add relevant support to adapter/lokijs too, or at least, add a check that will throw an Error when attempting to construct a loki query with this feature with a useful error message

@radex
Copy link
Collaborator

radex commented May 23, 2022

please also add a test here: https://github.com/Nozbe/WatermelonDB/blob/master/src/__tests__/databaseTests.js#L860 that actually checks for correct behavior (not just expected query syntax). this is important for checking cross-adapter compatibility

@mlecoq
Copy link
Contributor Author

mlecoq commented May 24, 2022

Thanks for your feedback

@mlecoq
Copy link
Contributor Author

mlecoq commented May 24, 2022

Looks nice, but please either add relevant support to adapter/lokijs too, or at least, add a check that will throw an Error when attempting to construct a loki query with this feature with a useful error message

I have chosen to throw an error, sorting on joined tables doesn't look to be supported currently on loki.js

@KrisLau

This comment was marked as off-topic.

@mlecoq mlecoq force-pushed the feat/sortOnJoinedTable branch 5 times, most recently from ace528b to b90a8ca Compare June 17, 2022 13:09
feat: update ts definition for sortBy method

fix: throw error when sort by is used on joined table with loki

test: add integration test on sort on joined table
@suman379
Copy link

suman379 commented Oct 5, 2023

Is this still active? I am waiting for this.

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

Successfully merging this pull request may close these issues.

None yet

4 participants