Skip to content

Commit d337279

Browse files
committed
Documented lastrowid attribute in py3k branch.
1 parent e871ad5 commit d337279

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/library/sqlite3.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ A :class:`Cursor` instance has the following attributes and methods:
531531
This includes ``SELECT`` statements because we cannot determine the number of
532532
rows a query produced until all rows were fetched.
533533

534+
.. attribute:: Cursor.lastrowid
535+
536+
This read-only attribute provides the rowid of the last modified row. It is
537+
only set if you issued a ``INSERT`` statement using the :meth:`execute`
538+
method. For operations other than ``INSERT`` or when :meth:`executemany` is
539+
called, :attr:`lastrowid` is set to :const:`None`.
534540

535541
.. _sqlite3-types:
536542

0 commit comments

Comments
 (0)