-
Notifications
You must be signed in to change notification settings - Fork 3
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
Other SPARQL Features #4
Comments
optional and union were already in the code. currently they work as follows: let pattern1 = new GraphPattern(triple1),
pattern2 = new GraphPattern([triple1, triple2], false, true), // second option sets UNION flag
group = new GroupGraphPattern([pattern1, pattern2]); and let pattern1 = new GraphPattern(triple1),
pattern2 = new GraphPattern([triple1, triple2], true, false), // first option sets OPTIONAL flag
group = new GroupGraphPattern([pattern1, pattern2]); not sure if this is the best way to represent it and i don't like the options in the constructor that much. i might update it to work like this: let group = new GroupGraphPattern({
$union: [pattern1, pattern2]
}); but first the subqueries... do you know if multiple subqueries are allowed? i couldn't really tell from the spec or i overlooked something. |
subqueries are now also included. you can just add a query as an element to a graph pattern. the endpoint can be null for this subquery (it is ignored so set it to whatever you want). prefixes and base are skipped when converting the subquery to string. var pattern = new GraphPattern([triple1, triple2, query]); |
Here's some more features from the SQARQL spec that might be implemented:
The text was updated successfully, but these errors were encountered: