Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
002b2020
Kaydet (Commit)
002b2020
authored
Şub 16, 2012
tarafından
Petri Lehtinen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix errors in sqlite3's Cursor.rowcount documentation
Closes #13995.
üst
14dc5103
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
shortcut_methods.py
Doc/includes/sqlite3/shortcut_methods.py
+1
-2
sqlite3.rst
Doc/library/sqlite3.rst
+5
-6
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/includes/sqlite3/shortcut_methods.py
Dosyayı görüntüle @
002b2020
...
...
@@ -17,5 +17,4 @@ con.executemany("insert into person(firstname, lastname) values (?, ?)", persons
for
row
in
con
.
execute
(
"select firstname, lastname from person"
):
print
row
# Using a dummy WHERE clause to not let SQLite take the shortcut table deletes.
print
"I just deleted"
,
con
.
execute
(
"delete from person where 1=1"
)
.
rowcount
,
"rows"
print
"I just deleted"
,
con
.
execute
(
"delete from person"
)
.
rowcount
,
"rows"
Doc/library/sqlite3.rst
Dosyayı görüntüle @
002b2020
...
...
@@ -548,18 +548,17 @@ Cursor Objects
attribute, the database engine's own support for the determination of "rows
affected"/"rows selected" is quirky.
For ``DELETE`` statements, SQLite reports :attr:`rowcount` as 0 if you make a
``DELETE FROM table`` without any condition.
For :meth:`executemany` statements, the number of modifications are summed up
into :attr:`rowcount`.
As required by the Python DB API Spec, the :attr:`rowcount` attribute "is -1 in
case no ``executeXX()`` has been performed on the cursor or the rowcount of the
last operation is not determinable by the interface".
last operation is not determinable by the interface". This includes ``SELECT``
statements because we cannot determine the number of rows a query produced
until all rows were fetched.
This includes ``SELECT`` statements because we cannot determine the number o
f
rows a query produced until all rows were fetched
.
With SQLite versions before 3.6.5, :attr:`rowcount` is set to 0 i
f
you make a ``DELETE FROM table`` without any condition
.
.. attribute:: Cursor.lastrowid
...
...
Misc/NEWS
Dosyayı görüntüle @
002b2020
...
...
@@ -575,6 +575,8 @@ Tests
Documentation
-------------
- Issue #13995: Fix errors in sqlite3'
s
Cursor
.
rowcount
documentation
-
Issue
#
13402
:
Document
absoluteness
of
sys
.
executable
.
-
Issue
#
13883
:
PYTHONCASEOK
also
works
on
OS
X
,
OS
/
2
,
and
RiscOS
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment