This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erlendaasland
Recipients erlendaasland
Date 2021-08-28.20:16:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630181796.88.0.161602783336.issue45040@roundup.psfhosted.org>
In-reply-to
Content
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(-)
History
Date User Action Args
2021-08-28 20:16:36erlendaaslandsetrecipients: + erlendaasland
2021-08-28 20:16:36erlendaaslandsetmessageid: <1630181796.88.0.161602783336.issue45040@roundup.psfhosted.org>
2021-08-28 20:16:36erlendaaslandlinkissue45040 messages
2021-08-28 20:16:36erlendaaslandcreate