| 14 | |
| 15 | === Class methods |
| 16 | |
| 17 | Class methods, one example being `select`, are used for table-wide queries. |
| 18 | |
| 19 | The signature of the `select` method is not consistent across all classes. |
| 20 | The `Milestone` class has an [browser:/trunk/trac/ticket/model.py?rev=13060&marks=1129#L1121 include_completed] parameter in the `select` method. |
| 21 | We could reconcile the inconsistency by having `where`, `limit` and `order_by` parameters on each method, with the parameters directly mapping to phrases in the SQL query. |
| 22 | This would make the methods more generally useful to plugin developers. |
| 23 | |
| 24 | Not only is the interface inconsistent, but also the return value. In most cases a generator is returned by `select`, however some `select` methods return a list: |
| 25 | * [browser:trunk/trac/ticket/model.py@13060:1137#L1128] |
| 26 | * [browser:trunk/trac/ticket/model.py@13060:1234#L1222] |