--On 5. Dezember 2005 16:57:03 +1300 Cameron Beattie <[EMAIL PROTECTED]> wr> I've read a bit about btrees on the zope wiki and wonder if that's the
best way. However I am struggling with the basics:
1. How do I get the data from MySQL into a btree in Zope? Something like:
from BTrees.IIBTree import *
t = IIBTree()
t.update(context.select_from_LOCATION_MATCH) # errr, no

Reading helps:

<http://www.zope.org/Members/ajung/ZopeHomeOfAndreasJung/BTrees/FrontPage>


2. How do I find the matching node i.e. when I want to know that 6422
relates to location_id 15?


I still have no idea what your example should tell me. A BTree basically
implements the same API as a Python dictionary. If you can implement your solution in pure Python then you can just switch to BTrees. But I have no idea about your example especially BTrees implement a 1:1
relationship (when using an IIBTree).

-aj

Attachment: pgpJEXUnC9XUz.pgp
Description: PGP signature

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to