|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: hyperdb.py,v 1.83 2002-10-03 06:56:29 richard Exp $ |
| 18 | +# $Id: hyperdb.py,v 1.84 2002-10-07 00:52:51 richard Exp $ |
19 | 19 |
|
20 | 20 | """ |
21 | 21 | Hyperdatabase implementation, especially field types. |
@@ -512,11 +512,20 @@ def find(self, **propspec): |
512 | 512 | """ |
513 | 513 | raise NotImplementedError |
514 | 514 |
|
515 | | - def filter(self, search_matches, filterspec, sort, group, |
516 | | - num_re = re.compile('^\d+$')): |
| 515 | + def filter(self, search_matches, filterspec, sort=(None,None), |
| 516 | + group=(None,None)): |
517 | 517 | ''' Return a list of the ids of the active nodes in this class that |
518 | 518 | match the 'filter' spec, sorted by the group spec and then the |
519 | | - sort spec |
| 519 | + sort spec. |
| 520 | +
|
| 521 | + "filterspec" is {propname: value(s)} |
| 522 | + "sort" and "group" are (dir, prop) where dir is '+', '-' or None |
| 523 | + and prop is a prop name or None |
| 524 | + "search_matches" is {nodeid: marker} |
| 525 | +
|
| 526 | + The filter must match all properties specificed - but if the |
| 527 | + property value to match is a list, any one of the values in the |
| 528 | + list may match for that property to match. |
520 | 529 | ''' |
521 | 530 | raise NotImplementedError |
522 | 531 |
|
|
0 commit comments