File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -793,18 +793,11 @@ Cursor Objects
793
793
794
794
.. attribute :: rowcount
795
795
796
- Although the :class: `Cursor ` class of the :mod: `sqlite3 ` module implements this
797
- attribute, the database engine's own support for the determination of "rows
798
- affected"/"rows selected" is quirky.
799
-
800
- For :meth: `executemany ` statements, the number of modifications are summed up
801
- into :attr: `rowcount `.
802
-
803
- As required by the Python DB API Spec, the :attr: `rowcount ` attribute "is -1 in
804
- case no ``executeXX() `` has been performed on the cursor or the rowcount of the
805
- last operation is not determinable by the interface". This includes ``SELECT ``
806
- statements because we cannot determine the number of rows a query produced
807
- until all rows were fetched.
796
+ Read-only attribute that provides the number of modified rows for
797
+ ``INSERT ``, ``UPDATE ``, ``DELETE ``, and ``REPLACE `` statements;
798
+ is ``-1 `` for other statements,
799
+ including :abbr: `CTE ( Common Table Expression ) ` queries.
800
+ It is only updated by the :meth: `execute ` and :meth: `executemany ` methods.
808
801
809
802
.. attribute :: lastrowid
810
803
You can’t perform that action at this time.
0 commit comments