mirror of https://github.com/python/cpython
Documented the lastrowid attribute.
This commit is contained in:
parent
5b63acd31e
commit
c15317efcd
|
@ -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
|
This includes ``SELECT`` statements because we cannot determine the number of
|
||||||
rows a query produced until all rows were fetched.
|
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:
|
.. _sqlite3-types:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue