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, felixxm, lemburg
Date 2022-01-11.20:30:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> You don't know on which cursor the last row was inserted [...]

SQLite has no concept of cursors :)

> It also seems that the function really only works for INSERTs and
> not for UPDATEs.

Yes, hence it's name: sqlite3_last_insert_rowid() !

> I'd suggest to deprecate the cursor.lastrowid attribute and
> instead point people to the much more useful [...]

Yes, I think mentioning the RETURNING ROWID trick in the sqlite3 docs is a very nice improvement. Mentioning the last_insert_rowid SQL function is probably also worth consideration.

I'm reluctant to deprecate cursor.lastrowid, though. ATM, I'm leaning towards just keeping the current behaviour.

> But this is your call :-)

I hear you are saying that, but strictly speaking I'm _not_ the sqlite3 module maintainer; I'm just a very eager contributor :)
Date User Action Args
2022-01-11 20:30:03erlendaaslandsetrecipients: + erlendaasland, lemburg, felixxm
2022-01-11 20:30:03erlendaaslandsetmessageid: <>
2022-01-11 20:30:03erlendaaslandlinkissue46249 messages
2022-01-11 20:30:03erlendaaslandcreate