Mercurial > p > roundup > code
comparison doc/customizing.txt @ 6409:ce99e0d39262
Add documentation for multilink expression syntax
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 11 May 2021 11:32:26 +0200 |
| parents | 7fb49f0c2dad |
| children | 3dbf1bc5e567 |
comparison
equal
deleted
inserted
replaced
| 6408:ef7bc1fac35a | 6409:ce99e0d39262 |
|---|---|
| 2982 | 2982 |
| 2983 eg. All issues with a priority of "1" with messages added in | 2983 eg. All issues with a priority of "1" with messages added in |
| 2984 the last week, sorted by activity date: | 2984 the last week, sorted by activity date: |
| 2985 ``issue.filter(filterspec={"priority": "1", | 2985 ``issue.filter(filterspec={"priority": "1", |
| 2986 'messages.creation' : '.-1w;'}, sort=[('activity', '+')])`` | 2986 'messages.creation' : '.-1w;'}, sort=[('activity', '+')])`` |
| 2987 | |
| 2988 Note that when searching for Link and Multilink values, the | |
| 2989 special value '-1' searches for empty Link or Multilink | |
| 2990 values. For both, Links and Multilinks, multiple values | |
| 2991 given in a filter call are combined with 'OR' by default. | |
| 2992 For Multilinks a postfix expression syntax using negative ID | |
| 2993 numbers (as strings) as operators is supported. Each | |
| 2994 non-negative number (or '-1') is pushed on an operand stack. | |
| 2995 A negative number pops the required number of arguments from | |
| 2996 the stack, applies the operator, and pushes the result. The | |
| 2997 following operators are supported: | |
| 2998 - '-2' stands for 'NOT' and takes one argument | |
| 2999 - '-3' stands for 'AND' and takes two arguments | |
| 3000 - '-4' stands for 'OR' and takes two arguments | |
| 3001 Note that this special handling of ID arguments is applied only | |
| 3002 when a negative number smaller than -1 is encountered as an ID | |
| 3003 in the filter call. Otherwise the implicit OR default | |
| 3004 applies. | |
| 3005 Examples of using Multilink expressions would be | |
| 3006 - '1', '2', '-4', '3', '4', '-4', '-3' | |
| 3007 would search for IDs (1 or 2) and (3 or 4) | |
| 3008 - '-1' '-2' would search for all non-empty Multilinks | |
| 2987 | 3009 |
| 2988 filter_sql **Only in SQL backends** | 3010 filter_sql **Only in SQL backends** |
| 2989 | 3011 |
| 2990 Lists the items that match the SQL provided. The SQL is a | 3012 Lists the items that match the SQL provided. The SQL is a |
| 2991 complete "select" statement. | 3013 complete "select" statement. |
