| Thread Previous • Date Previous • Date Next • Thread Next |
2010/6/16 Luciana Tricai Cavalini <lutricav@xxxxxxxxx> > Hi all, > > We are here having a meeting and some doubts about the ZODB Catalogs > arouse. > > At this point, we were able to create some of the objects for the > demographic use cases, but our problem is: how to retrieve them? > > After persisting those objects, how can I have ZODB, for example, send > me all persons who are known by 'Ana Bolena'. > This is related to building the ZODB catalog. > > It is known that ZODB catalog is easily generated, but we are having > trouble figuring it out. > > So, the question is: how can we create those catalogs? > > The zope.catalog[1] and zc.catalog[2] mechanism allows to do this task. In zope.catalog environment, a catalog object contains a set of parametrized indexes, each one related to a object attribute that will be indexed. When you add a object the object database, an event is triggered when a object is added, indexing each attribute that matches with indexes. To execute queries, the hurry.query[3] is the best option, IHMO. It has a set of object matchers which provided a well expressive query. At the moment, I'm doing the task of create a way to store and retrieve Party objects. I expect delivery it as soon as possible. [1] - http://pypi.python.org/pypi/zope.catalog . [2] - http://pypi.python.org/pypi/zc.catalog . [3] - http://pypi.python.org/pypi/hurry.query . > Thank you, > > Sergio and Luciana > > > -- > Esta mensagem foi verificada pelo sistema de antivírus e > acredita-se estar livre de perigo. > > > > _______________________________________________ > Mailing list: https://launchpad.net/~oship-dev > Post to : oship-dev@xxxxxxxxxxxxxxxxxxx > Unsubscribe : https://launchpad.net/~oship-dev > More help : https://help.launchpad.net/ListHelp > > -- http://dmpinheiro.net ----------------------------------- Diego Manhães Pinheiro Linux User #375020
| Thread Previous • Date Previous • Date Next • Thread Next |