Realm-js: Distinct / group by support?

Created on 7 Jun 2016  路  17Comments  路  Source: realm/realm-js

It would be very useful to have.

O-Community Pipeline-Idea-Backlog T-Feature

Most helpful comment

Is this supposed to be supported 2.3.x? Per the current documentation page:

_Sorting and find distinct values are possible with functions SORT and DISTINCT, e.g. age > 20 SORT(name ASC, age DESC) DISTINCT(name)._

I have tried to use these functions without success. I also have an open question on StackOverflow that is still unanswered.

All 17 comments

I vote

+1

@alazier, is there any workaround available for distinct and group by support in realm js

also support this idea and am curious if there are workarounds available

At the moment the only way to achieve this is to pull all your data and use something like lodash to accomplish it I'm afraid.

Fair enough, thanks for the quick answer. In general, is there any way to see and upvote the realm-js roadmap beyond github issues?

Not at the moment, no. However, we do monitor GitHub as it's what we use for our internal project planning so we do take notice when people comment in here.

I see鈥攖hanks for clarifying!

+1

+1

+1

+1

+1

+1

+1

Is this supposed to be supported 2.3.x? Per the current documentation page:

_Sorting and find distinct values are possible with functions SORT and DISTINCT, e.g. age > 20 SORT(name ASC, age DESC) DISTINCT(name)._

I have tried to use these functions without success. I also have an open question on StackOverflow that is still unanswered.

Yes, this seems to work well with a predicate followed by sort and distinct.
I even made it work with a relation: time != null SORT(activity.id ASC, time DESC) DISTINCT(activity)

Was this page helpful?
0 / 5 - 0 ratings