Mercurial > p > roundup > code
comparison doc/design.txt @ 3239:440f0a6a2e3c
merge from maint-0-8
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 03 Mar 2005 22:16:32 +0000 |
| parents | 460eb0209a9e |
| children | 976bd292eaa0 |
comparison
equal
deleted
inserted
replaced
| 3236:8d086eaeefcb | 3239:440f0a6a2e3c |
|---|---|
| 450 If the 'keyvalue' matches one of the values for the key | 450 If the 'keyvalue' matches one of the values for the key |
| 451 property among the items in this class, the matching item's | 451 property among the items in this class, the matching item's |
| 452 id is returned; otherwise a KeyError is raised. | 452 id is returned; otherwise a KeyError is raised. |
| 453 """ | 453 """ |
| 454 | 454 |
| 455 def find(self, propname, itemid): | 455 def find(self, **propspec): |
| 456 """Get the ids of items in this class which link to the | 456 """Get the ids of items in this class which link to the |
| 457 given items. | 457 given items. |
| 458 | 458 |
| 459 'propspec' consists of keyword args propname={itemid:1,} | 459 'propspec' consists of keyword args propname=itemid or |
| 460 'propname' must be the name of a property in this class, or | 460 propname={<itemid 1>:1, <itemid 2>: 1, ...} |
| 461 a KeyError is raised. That property must be a Link or | 461 'propname' must be the name of a property in this class, |
| 462 Multilink property, or a TypeError is raised. | 462 or a KeyError is raised. That property must |
| 463 be a Link or Multilink property, or a TypeError | |
| 464 is raised. | |
| 463 | 465 |
| 464 Any item in this class whose 'propname' property links to | 466 Any item in this class whose 'propname' property links to |
| 465 any of the itemids will be returned. Used by the full text | 467 any of the itemids will be returned. Examples:: |
| 466 indexing, which knows that "foo" occurs in msg1, msg3 and | 468 |
| 467 file7, so we have hits on these issues: | 469 db.issue.find(messages='1') |
| 468 | |
| 469 db.issue.find(messages={'1':1,'3':1}, files={'7':1}) | 470 db.issue.find(messages={'1':1,'3':1}, files={'7':1}) |
| 470 """ | 471 """ |
| 471 | 472 |
| 472 def filter(self, search_matches, filterspec, sort, group): | 473 def filter(self, search_matches, filterspec, sort, group): |
| 473 """ Return a list of the ids of the active items in this | 474 """ Return a list of the ids of the active items in this |
