gjhiggins/rdflib — Issue #196: API conflict with existing Store implementation (re: Issue 121)
Author: gjhiggins
Created: 2011-10-19 01:38:47+00:00
State: open

Originally filed by gerhard.weis@gmail.com on 2011-10-12T00:18:53

The fix for Issue 121 introduced a new method query to the Store interface.
Unfortunately this method has no documentation or minimal signature defined anywhere.

In addition to the lack of documentation there are Store plugins available already implementing a query method, but they do expect a different method signature. (e.g. see https://github.com/wwaites/py4s/blob/master/py4s/__init__.py or http://packages.python.org/virtuoso/rdflib.html ).

all these stores expect the first parameter to be a query, and the remaineder just some additional keyword parameters.

I could think of two ways to solve this problem in an easy way.
1. pass the graph as kw-parameter to self.store.query in rdflib/graph.py(797)
and add some documentation as optional method to the store interface
2. make the query.Processor / query.Result implementations more intelligent to handle this. (and remove the self.store.query thing at all from Graph.query(..)

the third option would be to force the store implementors to update their code, but that would probably cause more incompatibility issues than the two options above.

cheers

(happy to help implementing this or doing the work to solve this issue, as long as someone gives some directions. I have no idea about some roadmap or plans regarding rdflib.)