New submission from Erlend E. Aasland <erlend.aasl...@innova.no>:
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(-) ---------- components: Extension Modules messages: 400501 nosy: erlendaasland priority: low severity: normal status: open title: [sqlite3] optimise transaction control functions type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45040> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com