(key->replacer k)
(query sparql-file)
(query sparql-file repo)
(query sparql-file bindings repo)
Takes a string reference to a sparql-file on the resource path and optionally a map of bindings that should map SPARQL variables from your query to concrete values, allowing you to restrict and customise your query.
The bindings map is optional, and if it's not provided then the query in the file is run as is.
Additionally if your sparql query specifies a LIMIT or OFFSET the bindings map supports the special keys ::limits and ::offstets. Which should be maps binding identifiable limits/offsets from your query to new values.
The final argument should be the repository to query.
If only one argument referencing a resource path to a SPARQL query then a partially applied function is returned. e.g.
(def spog (query "grafter/rdf/sparql/select-spog.sparql"))
(spog r) ;; ... triples ...
(spog r {:s (java.net.URI. "http://example.org/data/a-triple")}) ;; triples for given subject s.
Takes a string reference to a sparql-file on the resource path and optionally a map of bindings that should map SPARQL variables from your query to concrete values, allowing you to restrict and customise your query. The bindings map is optional, and if it's not provided then the query in the file is run as is. Additionally if your sparql query specifies a LIMIT or OFFSET the bindings map supports the special keys ::limits and ::offstets. Which should be maps binding identifiable limits/offsets from your query to new values. The final argument should be the repository to query. If only one argument referencing a resource path to a SPARQL query then a partially applied function is returned. e.g. (def spog (query "grafter/rdf/sparql/select-spog.sparql")) (spog r) ;; ... triples ... (spog r {:s (java.net.URI. "http://example.org/data/a-triple")}) ;; triples for given subject s.
(var-key-matcher k)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close