Skip to content

Introduce a d3 style SPARQL query constructor. #3

Description

@l00mi

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions