]> granicus.if.org Git - python/commitdiff
Documented lastrowid attribute in py3k branch.
authorGerhard Häring <gh@ghaering.de>
Sat, 29 Mar 2008 19:13:55 +0000 (19:13 +0000)
committerGerhard Häring <gh@ghaering.de>
Sat, 29 Mar 2008 19:13:55 +0000 (19:13 +0000)
Doc/library/sqlite3.rst

index 3698b012917d2aa110b6127aebe3404c12854639..616be103a6964c263147f0e57996e13508e396c0 100644 (file)
@@ -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: