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

Support use of LinkList positions in queries #904

Closed
astigsen opened this issue Jun 24, 2015 · 1 comment
Closed

Support use of LinkList positions in queries #904

astigsen opened this issue Jun 24, 2015 · 1 comment

Comments

@astigsen
Copy link
Contributor

astigsen commented Jun 24, 2015

Support querying into specific positions (First, Last, 2nd...) in LinkLists. This is needed when querying into LinkLists where the user attach some meaning to the ordering (could be priority queues, highscore lists...).

In NSPredicates it is expressed as "friends[1] == %@", MySecondFriend or "friends[LAST].age > 16".

Suggested syntax:

size_t match1 = (table->column<LinkList>(linklist_col_id)[1] == MySecondFriend).find();
size_t match2 = (table->column<LinkList>(linklist_col_id).last().column<int>(age_col_id) > 16).find();

See also iOS issues:
realm/realm-swift#1490

@rrrlasse

@astigsen
Copy link
Contributor Author

Duplicate of #4269

@astigsen astigsen marked this as a duplicate of #4269 Aug 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants