Support SPARQL inline literals / blank nodes
Opened this issue · 0 comments
kiritsuku commented
Bundle.rdfstore.create(function(err, store) {
store.load("text/n3", "<#s> <#p> <#o> . <#o> <#a> <#p1> . <#o> <#b> <#p2> .", function(err, loadedTriples) {
store.execute("select * where { ?s ?p ?o . ?o <#a> ?a ; <#b> ?b . }", function(err, graph) {
console.log(err);
console.log(graph);
})
})
})
However, the following SPARQL query, where ?o
is inlined, produces an error:
Bundle.rdfstore.create(function(err, store) {
store.load("text/n3", "<#s> <#p> <#o> . <#o> <#a> <#p1> . <#o> <#b> <#p2> .", function(err, loadedTriples) {
store.execute("select * where { ?s ?p [<#a> ?a ; <#b> ?b] . }", function(err, graph) {
console.log(err);
console.log(graph);
})
})
})
The error is super ugly:
TypeError: callback is not a function
If this syntax is not supported, it should at least show a better error message.