Skip to content

feat: support sortBy on joined table - #1327

Open
mlecoq wants to merge 1 commit into
Nozbe:masterfrom
mlecoq:feat/sortOnJoinedTable
Open

feat: support sortBy on joined table#1327
mlecoq wants to merge 1 commit into
Nozbe:masterfrom
mlecoq:feat/sortOnJoinedTable

Conversation

@mlecoq

@mlecoq mlecoq commented May 17, 2022

Copy link
Copy Markdown
Contributor

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

radex commented May 23, 2022

Copy link
Copy Markdown
Collaborator

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

radex commented May 23, 2022

Copy link
Copy Markdown
Collaborator

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

mlecoq commented May 24, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for your feedback

@mlecoq

mlecoq commented May 24, 2022

Copy link
Copy Markdown
Contributor Author

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
@mlecoq
mlecoq force-pushed the feat/sortOnJoinedTable branch from b90a8ca to 42dcad1 Compare May 2, 2023 12:13
@sumansaurabh00001

Copy link
Copy Markdown

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.

4 participants