You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgetting to call self.con.commit() imperatively can be the source of a lot of silly bugs, as seen in #63.
Setting autocommit=True is bad for performance, as a single batched commit is significantly faster than multiple commits. The way this is currently being managed is that private methods never commit, and public methods should always commit right before returning the value. However, this currently needs to be done imperatively at every possible return point in each public method, which is fragile.
Proposed Solution
There should be a @commit decorator that wraps every public method.
The text was updated successfully, but these errors were encountered:
Problem
Forgetting to call
self.con.commit()
imperatively can be the source of a lot of silly bugs, as seen in #63.Setting
autocommit=True
is bad for performance, as a single batched commit is significantly faster than multiple commits. The way this is currently being managed is that private methods never commit, and public methods should always commit right before returning the value. However, this currently needs to be done imperatively at every possible return point in each public method, which is fragile.Proposed Solution
There should be a
@commit
decorator that wraps every public method.The text was updated successfully, but these errors were encountered: