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

Evaluate an attribute against a member of a set #5527

Open
haikalpribadi opened this issue Dec 1, 2019 · 1 comment
Open

Evaluate an attribute against a member of a set #5527

haikalpribadi opened this issue Dec 1, 2019 · 1 comment

Comments

@haikalpribadi
Copy link
Member

Problem to Solve

We would like to query a pattern that evaluates the value of an attribute against a member of a set. For example:

match $x isa person, has occupation in ["working", "student", "unemployed"];

Current Workaround

Multiple disjunctions of attribute evaluations.

Proposed Solution

match $x isa person, has occupation in ["working", "student", "unemployed"];

Additional Information

To be further designed: How to assign a variable to the attribute?

@lveillard
Copy link

Another current workaround we use is using 'link' with an ugly regex 'valueA|valueB|ValueC'
But with obvious performance impacts, so eager to get this 'in' clause.

It would be also nice to be able to use "in" to create subsets, for instance

$a ($players) isa authorship;
$b isa reviewer;
$c is {$b in $players}

This example is workaroundable, but other more complex use cases are not. I'm just showing this one as it is easier to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants