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

overwriting LIMIT not working #5

Open
jameslaneconkling opened this issue Feb 4, 2018 · 0 comments
Open

overwriting LIMIT not working #5

jameslaneconkling opened this issue Feb 4, 2018 · 0 comments

Comments

@jameslaneconkling
Copy link

Trying to specify a query limit at runtime, but the returned result contains the limit hardcoded into the sparql file.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?property ?propertyLabel
WHERE {
    ?type (rdfs:subClassOf)* ?class .
    ?property rdfs:domain ?class .
    ?property rdfs:label ?propertyLabel .
    FILTER ( LANG(?propertyLabel) = "en" )
}
LIMIT 10 
(defquery get-properties-for-type-query "sparql/dbpedia/get-properties-for-type.sparql"
  {:connection  "http://dbpedia.org/sparql"})

  (count (with-open [result (get-properties-for-type-query
                      {:limit 5
                       :bindings {:type "http://dbpedia.org/ontology/Organization"}})]
    (format-properties-response result)))
;; => 10

Or is it possible I'm mis-using the lib or misunderstanding the documentation?

Thanks for the help, and cheers to the good work on this.

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