walidazizi / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

API conflict with existing Store implementation (re: Issue 121) #197

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.)

Original issue reported on code.google.com by gerhard.weis@gmail.com on 12 Oct 2011 at 12:18

GoogleCodeExporter commented 8 years ago

Original comment by gromgull on 13 Jan 2012 at 12:43