links-lang / links

Links: Linking Theory to Practice for the Web
http://www.links-lang.org
Other
332 stars 42 forks source link

SPARQL improvements #1186

Open jamescheney opened 1 year ago

jamescheney commented 1 year ago

This issue collects tasks / minor improvements to the low level SPARQL querying function.

[ ] rdf and some other libraries are added as hard Links dependencies. It would be good to have a separate "driver" for the SPARQL querying interface, like for the databases. [ ]Currently a single function is exposed which takes three arguments: a "base IRI" (needed only if the result is a graph, AFAICT), the URI of the SPARQL endpoint, and the SPARQL query to actually run. More functions for example to cater to the common case where the base isn't needed, and to allow for different flavors of SPARQL queries, such as ASK (returns boolean) or CONSTRUCT (returns graph), might be nice. Currently only SELECT (return list of variable-value bindings) is supported. [ ] The code currently throws away type/structure information about the query results and just converts everything to strings. We could retain the structure of the returned RDF values/terms in Links instead. [ ] We are using LWT which apparently will at some point be subsumed/replaced by other OCaml 5 features. The rdf library uses LWT also so this dependency will also have to change at that point.