[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

Alex Lord report at bugs.python.org
Sun May 10 23:16:58 CEST 2015


Alex Lord added the comment:

Thanks for Alex_gayner and lifeless. They pointed out the sqlite3_last_row_id is part of the sqlite3 module itself (not cpython).

https://www.sqlite.org/c3ref/last_insert_rowid.html

According the documentation we can expect that if a constraint stops an insertion then the lostrowid is not modified. As such the changes required to add full INSERT OR CONDITION support for last row id is unit tests for each statement and changing the conditional to recognize all insert cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16864>
_______________________________________


More information about the Python-bugs-list mailing list