Skip to content

Other SPARQL Features  #4

Open
Open

Description

@martinleopold

Here's some more features from the SQARQL spec that might be implemented:

Activity

  1. changed the title [-]Other S[/-] [+]Other SPARQL Features [/+] on Dec 11, 2015
  2. dasantonym commented on Feb 5, 2016

    @dasantonym
    Member

    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.

  3. dasantonym commented on Feb 5, 2016

    @dasantonym
    Member

    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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions