[ZODB-Dev] grab zodb dict keys by search term

2013-12-10 Thread Tamer Higazi
Hi people! I am working a lot with IOB and OOB Trees as well with PersistentDict and PersistentList to store my Data in ZODB. I want to ask if there is a way to grab data from a dataset by search time. I know only the SQL way: select lower(COL1) from table1 where COL1 LIKE 'aa%' so usually

Re: [ZODB-Dev] grab zodb dict keys by search term

2013-12-10 Thread Alan Runyan
ZODB has nothing built-in. You build it on top of the ZODB. I think what you are looking for is something like Hypatia - https://github.com/Pylons/hypatia On Tue, Dec 10, 2013 at 4:46 PM, Tamer Higazi tamerito...@arcor.de wrote: Hi people! I am working a lot with IOB and OOB Trees as well

Re: [ZODB-Dev] grab zodb dict keys by search term

2013-12-10 Thread Darryl Dixon - Winterhouse Consulting
Hi Tamer, It depends on what you're trying to achieve. BTrees should not be mutated whilst iterating over them, so depending on how you have structured your data, you might do something like: for key in [x for x in BTree.keys() if x.startswith('aa')]: # Do stuff Or perhaps something else