From: Daniel \eikeon\ K. <ei...@ei...> - 2002-04-16 07:55:17
|
The visit method will need to be implemented in order for the triple store to be useful in the context of redfoot, as all the other query methods are layered on top of it. The visit method with its callback was our way to avoid building up the entire list. We have yet to look into generators as an alternative / additional way of accomplishing this. We definitely will look at generators to see how they best fit. --eikeon PS: [What is involved in installing all that is needed for bsdb3 on windows and/or linux? Started to try and install it now, but was not sure what I needed... perhaps because it is late] -----Original Message----- From: red...@li... [mailto:red...@li...] On Behalf Of aku...@me... Sent: Monday, April 15, 2002 11:54 PM To: red...@li... Subject: [Redfoot-general] First cut at BerkeleyDB triple store See http://www.amk.ca/files/python/rdfdb.py for a persistent triple storage implemented on top of BerkeleyDB using the bsdb3 module. A simple test case is included at the bottom of the file. Questions: * Should I make it match the interface of triple.py exactly? Right now it doesn't match, but fixing that shouldn't be difficult. * It would be nice to have a variant of search() that uses 2.1/2.2's generators to avoid constructing a list of all matching tuples. That wouldn't match triple.py, unless the feature was added there, too. I haven't been able to figure out how to integrate it with ZODB's transaction machinery yet, but will continue to look into that. --amk (www.amk.ca) Our duty, if not our conscience, is clear. -- President Borusa, in "Arc of Infinity" |