Mercurial > p > roundup > code
comparison doc/design.txt @ 3237:ed97e2a85576 maint-0.8
clearer docs for find(); couple of other post-release fixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 03 Mar 2005 22:12:36 +0000 |
| parents | ac1803a09920 |
| children |
comparison
equal
deleted
inserted
replaced
| 3234:16f689d45b35 | 3237:ed97e2a85576 |
|---|---|
| 395 are not returned by the find(), list(), or lookup() methods, | 395 are not returned by the find(), list(), or lookup() methods, |
| 396 and other items may reuse the values of their key | 396 and other items may reuse the values of their key |
| 397 properties. | 397 properties. |
| 398 """ | 398 """ |
| 399 | 399 |
| 400 def restore(self, nodeid): | 400 def restore(self, itemid): |
| 401 '''Restore a retired node. | 401 '''Restore a retired item. |
| 402 | 402 |
| 403 Make node available for all operations like it was before | 403 Make item available for all operations like it was before |
| 404 retirement. | 404 retirement. |
| 405 ''' | 405 ''' |
| 406 | 406 |
| 407 def history(self, itemid): | 407 def history(self, itemid): |
| 408 """Retrieve the journal of edits on a particular item. | 408 """Retrieve the journal of edits on a particular item. |
| 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 |
