Skip to content
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

Support SPARQL inline literals / blank nodes #141

Open
kiritsuku opened this issue Sep 10, 2016 · 0 comments
Open

Support SPARQL inline literals / blank nodes #141

kiritsuku opened this issue Sep 10, 2016 · 0 comments

Comments

@kiritsuku
Copy link

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.

@kiritsuku kiritsuku changed the title Support SPARQL inline literals (blank nodes) Support SPARQL inline literals / blank nodes Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant