rdfstore-js
rdfstore-js copied to clipboard
Question: VALUES keyword
Is there a support of the VALUES keyword as it is specified in the SPARQL 1.1 spec ?
- https://www.w3.org/TR/sparql11-query/#inline-data
Example: Data:
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix : <http://example.org/book/> .
@prefix ns: <http://example.org/ns#> .
:book1 dc:title "SPARQL Tutorial" .
:book1 ns:price 42 .
:book2 dc:title "The Semantic Web" .
:book2 ns:price 23 .
Query:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://example.org/book/>
PREFIX ns: <http://example.org/ns#>
SELECT ?book ?title ?price
{
VALUES ?book { :book1 :book3 }
?book dc:title ?title ;
ns:price ?price .
}
Results:
book | title | price |
---|---|---|
http://example.org/book/book1 | "SPARQL Tutorial" | 42 |