mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Documented the lastrowid attribute.
This commit is contained in:
		
							parent
							
								
									5b63acd31e
								
							
						
					
					
						commit
						c15317efcd
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue