Edgewall Software

Changes between Version 1 and Version 2 of Ticket #9536, comment 5


Ignore:
Timestamp:
Sep 13, 2010, 10:43:23 PM (11 years ago)
Author:
Remy Blank

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9536, comment 5

    v1 v2  
    66 * Why set `self._env` to `None` after getting the connection? Wouldn't it be more intuitive to set a `_db = None` at class scope, and check for that in `__exit__()` to decide if a commit or rollback is needed?
    77 * Does it make sense to use "private" attributes like `_env` and `_db`, when the context manager won't ever be accessible to the users anyway? I would prefer dropping the underscores.
    8  * I like the idea of preventing commits and rollbacks in query connections, but could we add that functionality to `ConnectionWrapper` instead? (I haven't got time to look now, so correct me if I'm wrong.)
     8 * I like the idea of preventing commits and rollbacks in query connections, ~~but could we add that functionality to `ConnectionWrapper` instead~~? (I haven't got time to look now, so correct me if I'm wrong.) (Yes, I'm wrong, we probably need another wrapper.)