Use namedtuples in Query.alias_map to make debugging easier
|Reported by:||lrekucki||Owned by:||adrian|
|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)
Changed 4 years ago by lrekucki
Changed 4 years ago by akaariai
comment:4 Changed 4 years ago by adrian
- Owner changed from lrekucki to adrian
- Status changed from new to assigned