Skip to content

Enhancement request: more metadata about query results #62

ijdickinson opened this Issue Dec 6, 2013 · 0 comments

1 participant


When executing a SPARQL select query via Store.execute, the results come back as an array of object literals, where each key is one of the variables in the select. This makes two use cases harder, where the UI allows users to write or edit their own queries:

  • when presenting results to the user, it is harder to know which variables were part of the original query, as variables that occur in OPTIONAL clauses do not necessarily appear as keys in the return values;

  • when presenting results to the user, it is harder to list the variables in the same order as the user articulated in the original query, so the user has to work harder to relate the results to the query they wrote.

Both of these use cases could be addressed by providing a more structured return value which includes some metadata (e.g. an ordered list of the variables bound by the query) as well as the result bindings.

An alternative would be to allow the Store object to expose the SparqlParser object, so that we could at least re-parse the user's query to extract bound variables, or other structural features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.