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