zazuko / query-rdf-data-cube

Explore or query RDF Data Cubes with a JavaScript API, without writing SPARQL.
https://zazuko.github.io/query-rdf-data-cube/
9 stars 2 forks source link

Query is limited to 10 observations if not set #33

Closed lucguillemot closed 4 years ago

lucguillemot commented 4 years ago

As indicated in the documentation, the number of returned observations is limited to 10 by default if .limit()is not set when a query is executed. Is it possible to return all the observations when a limit is not defined?

vhf commented 4 years ago

Having a default limit prevents accidents, on some SPARQL endpoints an unfortunate query might take minutes to execute and users of the lib or endusers usually give up and retry, which puts an unnecessary load on the endpoint. For this reason we'd rather keep it.

Is it possible to return all the observations when a limit is not defined?

Not yet but I totally agree, it should be possible. What about explicitly asking for no limit, eg. .limit(null)?

jstcki commented 4 years ago

.limit(null) sounds good to me!

lucguillemot commented 4 years ago

Thanks for your answer. Yes, I agree, null sounds good, and works, except for a type error (limit should be nullable) ;-)

vhf commented 4 years ago

Published: https://www.npmjs.com/package/@zazuko/query-rdf-data-cube/v/0.2.3

jstcki commented 4 years ago

Thanks @vhf !