RDFLib / sparqlwrapper

A wrapper for a remote SPARQL endpoint
https://sparqlwrapper.readthedocs.io/
Other
526 stars 122 forks source link

Align query result types with rdflib #230

Open namedgraph opened 1 year ago

namedgraph commented 1 year ago

This logic returns different representations based on the return format. I think this breaks the abstraction. The reasonable return type in this case would be rdflib's Result.

I think the method's return type should be the same as rdflib's Graph.query():

def convert(self) -> rdflib.query.Result:

so as to align querying in-memory and remote RDF sources. Or maybe the convert method is not required at all and query should return rdflib.query.Result.