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 @@ -956,18 +956,11 @@ Cursor Objects
956
956
957
957
.. attribute :: rowcount
958
958
959
- Although the :class: `Cursor ` class of the :mod: `sqlite3 ` module implements this
960
- attribute, the database engine's own support for the determination of "rows
961
- affected"/"rows selected" is quirky.
962
-
963
- For :meth: `executemany ` statements, the number of modifications are summed up
964
- into :attr: `rowcount `.
965
-
966
- As required by the Python DB API Spec, the :attr: `rowcount ` attribute "is -1 in
967
- case no ``executeXX() `` has been performed on the cursor or the rowcount of the
968
- last operation is not determinable by the interface". This includes ``SELECT ``
969
- statements because we cannot determine the number of rows a query produced
970
- until all rows were fetched.
959
+ Read-only attribute that provides the number of modified rows for
960
+ ``INSERT ``, ``UPDATE ``, ``DELETE ``, and ``REPLACE `` statements;
961
+ is ``-1 `` for other statements,
962
+ including :abbr: `CTE ( Common Table Expression ) ` queries.
963
+ It is only updated by the :meth: `execute ` and :meth: `executemany ` methods.
971
964
972
965
.. attribute :: lastrowid
973
966
You can’t perform that action at this time.
0 commit comments