summaryrefslogtreecommitdiffstats
path: root/todolists/utils.py
AgeCommit message (Collapse)AuthorFilesLines
2012-12-28Convert to using new todolist models everywhereDan McGee1-7/+7
This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Improve performance of todolists queryDan McGee1-15/+26
Use some standard SQL and split the query into two different parts to save a lot of unnecessary sorting and field retrieval at the database level. The `CASE WHEN complete THEN 1 ELSE 0 END` syntax should be accepted by any database that implements proper SQL; it was tested in PostgreSQL and sqlite3 without issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27Incomplete-only todolists optimizationDan McGee1-2/+6
We can push this down to the database if we know in advance we only need the incomplete lists. This helps our call on the developer dashboard quite a bit; the time of the single query in question drops from >1300ms to around 40ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Prevent selection of many useless fields when getting todolistsDan McGee1-1/+5
This is a bit of a hack, but makes the resulting resultset returned from the database a lot smaller and kills off all the columns we don't care about and would never look at. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09Show more info about todolists on developer dashboardDan McGee1-0/+19
Signed-off-by: Dan McGee <dan@archlinux.org>