d3-sparql icon indicating copy to clipboard operation
d3-sparql copied to clipboard

Introduce a d3 style SPARQL query constructor.

Open l00mi opened this issue 6 years ago • 0 comments

It might be possible to create a query constructor looking something like the following:

d3.sparql(endpoint)
  .prefix("vcard","http://www.w3.org/2006/vcard/ns#")
  .select("card")
  .select("name")
  .where("card", a, "vcard:Individual")
  .where("card", "vcard:name", "name")
  .filter("name", "=", "Michael")
  .limit(100)

to build the QUERY:

SELECT ?card ?name WHERE {
  ?card a vcard:Individual.
  ?card vcard:name ?name.
  FILTER( ?name = 'Michael')
}
LIMIT 100

Not sure about the potential benefits? Evt. automated query builders?

l00mi avatar Aug 01 '17 13:08 l00mi