diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-06-14 12:25:36 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-06-14 12:25:36 (GMT) |
commit | e0b70cd8a986aaeec74f5647c7ffc4200f2e14f3 (patch) | |
tree | ee6330d78f8e667768a708ba90896528e24728af /Doc/library/sqlite3.rst | |
parent | 34f12d73158de5ad37c08009832d68ff7b8eeb7a (diff) | |
download | cpython-e0b70cd8a986aaeec74f5647c7ffc4200f2e14f3.zip cpython-e0b70cd8a986aaeec74f5647c7ffc4200f2e14f3.tar.gz cpython-e0b70cd8a986aaeec74f5647c7ffc4200f2e14f3.tar.bz2 |
Issue #16864: Cursor.lastrowid now supports REPLACE statement
Initial patch by Alex LordThorsen.
Diffstat (limited to 'Doc/library/sqlite3.rst')
-rw-r--r-- | Doc/library/sqlite3.rst | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 605d8d3..2cd823e 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -629,9 +629,16 @@ Cursor Objects .. attribute:: lastrowid This read-only attribute provides the rowid of the last modified row. It is - only set if you issued an ``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`. + only set if you issued an ``INSERT`` or a ``REPLACE`` statement using the + :meth:`execute` method. For operations other than ``INSERT`` or + ``REPLACE`` or when :meth:`executemany` is called, :attr:`lastrowid` is + set to :const:`None`. + + If the ``INSERT`` or ``REPLACE`` statement failed to insert the previous + successful rowid is returned. + + .. versionchanged:: 3.6 + Added support for the ``REPLACE`` statement. .. attribute:: description |