WatermelonDB icon indicating copy to clipboard operation
WatermelonDB copied to clipboard

feat: support sortBy on joined table

Open mlecoq opened this issue 2 years ago • 6 comments

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

mlecoq avatar May 17 '22 19:05 mlecoq

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 avatar May 23 '22 12:05 radex

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

radex avatar May 23 '22 12:05 radex

Thanks for your feedback

mlecoq avatar May 24 '22 07:05 mlecoq

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

mlecoq avatar May 24 '22 10:05 mlecoq

@radex Could you please take a look at #1249 ? It's a PR by an Expo maintainer

KrisLau avatar May 26 '22 20:05 KrisLau

Is this still active? I am waiting for this.

suman379 avatar Oct 05 '23 10:10 suman379