From: Gerhard Häring Date: Sat, 29 Mar 2008 19:13:55 +0000 (+0000) Subject: Documented lastrowid attribute in py3k branch. X-Git-Tag: v3.0a4~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3372793d6de665be2f866e9245a33bcefeaaa76;p=python Documented lastrowid attribute in py3k branch. --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 3698b01291..616be103a6 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -531,6 +531,12 @@ A :class:`Cursor` instance has the following attributes and methods: This includes ``SELECT`` statements because we cannot determine the number of rows a query produced until all rows were fetched. +.. attribute:: Cursor.lastrowid + + This read-only attribute provides the rowid of the last modified row. It is + only set if you issued a ``INSERT`` statement using the :meth:`execute` + method. For operations other than ``INSERT`` or when :meth:`executemany` is + called, :attr:`lastrowid` is set to :const:`None`. .. _sqlite3-types: