Mercurial > p > roundup > code
diff 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 |
line wrap: on
line diff
--- a/doc/design.txt Thu Mar 03 10:00:40 2005 +0000 +++ b/doc/design.txt Thu Mar 03 22:16:32 2005 +0000 @@ -452,20 +452,21 @@ id is returned; otherwise a KeyError is raised. """ - def find(self, propname, itemid): + def find(self, **propspec): """Get the ids of items in this class which link to the given items. - 'propspec' consists of keyword args propname={itemid:1,} - 'propname' must be the name of a property in this class, or - a KeyError is raised. That property must be a Link or - Multilink property, or a TypeError is raised. + 'propspec' consists of keyword args propname=itemid or + propname={<itemid 1>:1, <itemid 2>: 1, ...} + 'propname' must be the name of a property in this class, + or a KeyError is raised. That property must + be a Link or Multilink property, or a TypeError + is raised. Any item in this class whose 'propname' property links to - any of the itemids will be returned. Used by the full text - indexing, which knows that "foo" occurs in msg1, msg3 and - file7, so we have hits on these issues: + any of the itemids will be returned. Examples:: + db.issue.find(messages='1') db.issue.find(messages={'1':1,'3':1}, files={'7':1}) """
