Use namedtuples in Query.alias_map to make debugging easier
|Reported by:||Łukasz Rekucki||Owned by:||Adrian Holovaty|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Debugging the SQL compiler is not an easy task, and having to keep track of values in 8-tuples doesn't make it easier ;) There are probably more places that this could be applied to, not just
alias_map, but it's a start.
namedtuple has no extra memory or performance overhead (I didn't notice any change in the runtime of testsuite).
On Python 2.5, we just use a plain tuple (lookup code hasn't been changed so it just works).
Change History (8)
comment:4 Changed 5 years ago by
|Owner:||changed from Łukasz Rekucki to Adrian Holovaty|
|Status:||new → assigned|