Documented the lastrowid attribute.

This commit is contained in:
Gerhard Häring 2008-03-29 19:11:52 +00:00
parent 5b63acd31e
commit c15317efcd
1 changed files with 6 additions and 0 deletions

View File

@ -532,6 +532,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: