Message400501
pysqlite_connection_commit_impl(), pysqlite_connection_rollback_impl(), and begin_transaction() can be simplified:
sqlite3_finalize() will pass on any error set by sqlite3_step(). This implies that we only need to check the return value of sqlite3_prepare_v2() and sqlite3_finalize(), which implies that we can execute sqlite3_prepare_v2(), sqlite3_step() and sqlite3_finalize() in a row inside a begin/end threads wrapper. As a result, error handling will be greatly simplified.
Fewer lines of code, simpler error paths, increased readability, and increased code coverage.
diffstat: 2 files changed, 27 insertions(+), 62 deletions(-) |
|
Date |
User |
Action |
Args |
2021-08-28 20:16:36 | erlendaasland | set | recipients:
+ erlendaasland |
2021-08-28 20:16:36 | erlendaasland | set | messageid: <1630181796.88.0.161602783336.issue45040@roundup.psfhosted.org> |
2021-08-28 20:16:36 | erlendaasland | link | issue45040 messages |
2021-08-28 20:16:36 | erlendaasland | create | |
|