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
f558d2e5
Kaydet (Commit)
f558d2e5
authored
Ock 19, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1509: fix sqlite3 docstrings and docs w.r.t. cursor.fetchXXX methods.
üst
e047e6dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
sqlite3.rst
Doc/library/sqlite3.rst
+31
-3
cursor.c
Modules/_sqlite/cursor.c
+3
-3
No files found.
Doc/library/sqlite3.rst
Dosyayı görüntüle @
f558d2e5
:mod:`sqlite3` --- DB-API 2.0 interface for SQLite databases
============================================================
...
...
@@ -389,7 +388,7 @@ A :class:`Cursor` instance has the following attributes and methods:
.. method:: Cursor.execute(sql, [parameters])
Executes a SQL statement. The SQL statement may be parametrized (i. e.
Executes a
n
SQL statement. The SQL statement may be parametrized (i. e.
placeholders instead of SQL literals). The :mod:`sqlite3` module supports two
kinds of placeholders: question marks (qmark style) and named placeholders
(named style).
...
...
@@ -410,7 +409,7 @@ A :class:`Cursor` instance has the following attributes and methods:
.. method:: Cursor.executemany(sql, seq_of_parameters)
Executes a SQL command against all parameter sequences or mappings found in
Executes a
n
SQL command against all parameter sequences or mappings found in
the sequence *sql*. The :mod:`sqlite3` module also allows using an
:term:`iterator` yielding parameters instead of a sequence.
...
...
@@ -434,6 +433,35 @@ A :class:`Cursor` instance has the following attributes and methods:
.. literalinclude:: ../includes/sqlite3/executescript.py
.. method:: Cursor.fetchone()
Fetches the next row of a query result set, returning a single sequence,
or ``None`` when no more data is available.
.. method:: Cursor.fetchmany([size=cursor.arraysize])
Fetches the next set of rows of a query result, returning a list. An empty
list is returned when no more rows are available.
The number of rows to fetch per call is specified by the *size* parameter.
If it is not given, the cursor's arraysize determines the number of rows
to be fetched. The method should try to fetch as many rows as indicated by
the size parameter. If this is not possible due to the specified number of
rows not being available, fewer rows may be returned.
Note there are performance considerations involved with the *size* parameter.
For optimal performance, it is usually best to use the arraysize attribute.
If the *size* parameter is used, then it is best for it to retain the same
value from one :meth:`fetchmany` call to the next.
.. method:: Cursor.fetchall()
Fetches all (remaining) rows of a query result, returning a list. Note that
the cursor's arraysize attribute can affect the performance of this operation.
An empty list is returned when no rows are available.
.. attribute:: Cursor.rowcount
Although the :class:`Cursor` class of the :mod:`sqlite3` module implements this
...
...
Modules/_sqlite/cursor.c
Dosyayı görüntüle @
f558d2e5
...
...
@@ -991,11 +991,11 @@ static PyMethodDef cursor_methods[] = {
{
"executescript"
,
(
PyCFunction
)
pysqlite_cursor_executescript
,
METH_VARARGS
,
PyDoc_STR
(
"Executes a multiple SQL statements at once. Non-standard."
)},
{
"fetchone"
,
(
PyCFunction
)
pysqlite_cursor_fetchone
,
METH_NOARGS
,
PyDoc_STR
(
"Fetches
several rows
from the resultset."
)},
PyDoc_STR
(
"Fetches
one row
from the resultset."
)},
{
"fetchmany"
,
(
PyCFunction
)
pysqlite_cursor_fetchmany
,
METH_VARARGS
,
PyDoc_STR
(
"Fetches
al
l rows from the resultset."
)},
PyDoc_STR
(
"Fetches
severa
l rows from the resultset."
)},
{
"fetchall"
,
(
PyCFunction
)
pysqlite_cursor_fetchall
,
METH_NOARGS
,
PyDoc_STR
(
"Fetches
one row
from the resultset."
)},
PyDoc_STR
(
"Fetches
all rows
from the resultset."
)},
{
"close"
,
(
PyCFunction
)
pysqlite_cursor_close
,
METH_NOARGS
,
PyDoc_STR
(
"Closes the cursor."
)},
{
"setinputsizes"
,
(
PyCFunction
)
pysqlite_noop
,
METH_VARARGS
,
...
...
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