- Timestamp:
- 22 May 2015, 10:39:19 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/doctests/catalog.txt
r12988 r12993 1 :mod:`waeup.ikoba.catalog` -- Cataloging support Ikoba 2 ****************** **********************************1 Cataloging Support 2 ****************** 3 3 4 4 .. module:: waeup.ikoba.catalog … … 18 18 ------------------ 19 19 20 .. class:: IkobaQuery()21 22 .. attribute:: grok.implements(hurry.query.interfaces.IQuery)23 24 A `hurry.query.query.Query` compatible query that also supports25 retrival of plain ``Bree`` result sets as used inside a catalog.26 27 Like `hurry.query.query.Query` objects, `IkobaQuery` is some kind28 of a meta query or 'compound query' that can give the cataloged29 objects (or their int ids) matching one or more 'subqueries'.30 31 This way you can search for objects (or their int ids) that match32 several criteria at the same time. See ``examples`` section below.33 34 A singleton instance of this class is also available as global35 utility.36 37 .. method:: searchResults(query)38 39 Get the cataloged objects determined by ``query``.40 41 .. method:: apply(query)42 43 Get the list of int ids (a `BTree` result set) for objects44 determined by ``query``.45 46 The list of int ids is less expensive to compute than the47 complete search results and sufficient, for instance, when you48 only need the number of objects that match a query and not the49 objects themselves.50 51 Examples52 ========53 54 20 Getting a general query object 55 ------------------------------ 21 ============================== 56 22 57 23 We can get a IkobaQuery object by asking for an unnamed global utility … … 69 35 70 36 Setting up a catalog and feeding it 71 ----------------------------------- 37 =================================== 72 38 73 39 >>> from zope.catalog.interfaces import ICatalog … … 148 114 149 115 Searching for result sets 150 ------------------------- 116 ========================= 151 117 152 118 Finally we can perform queries: … … 198 164 199 165 Searching for objects 200 --------------------- 166 ===================== 201 167 202 168 Very often we don't want to know the catalog-internal 'ids' of
Note: See TracChangeset for help on using the changeset viewer.