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
b5845056
Kaydet (Commit)
b5845056
authored
Eyl 13, 2009
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
small fixes in the examples and in the markup
üst
8f7649ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
sqlite3.rst
Doc/library/sqlite3.rst
+12
-11
No files found.
Doc/library/sqlite3.rst
Dosyayı görüntüle @
b5845056
...
...
@@ -79,12 +79,12 @@ This example uses the iterator form::
>>> c = conn.cursor()
>>> c.execute('select * from stocks order by price')
>>> for row in c:
... print(row)
...
print(row)
...
(
u'2006-01-05', u'BUY', u
'RHAT', 100, 35.14)
(
u'2006-03-28', u'BUY', u
'IBM', 1000, 45.0)
(
u'2006-04-06', u'SELL', u
'IBM', 500, 53.0)
(
u'2006-04-05', u'BUY', u
'MSOFT', 1000, 72.0)
(
'2006-01-05', 'BUY',
'RHAT', 100, 35.14)
(
'2006-03-28', 'BUY',
'IBM', 1000, 45.0)
(
'2006-04-06', 'SELL',
'IBM', 500, 53.0)
(
'2006-04-05', 'BUY',
'MSOFT', 1000, 72.0)
>>>
...
...
@@ -589,18 +589,19 @@ Now we plug :class:`Row` in::
<sqlite3.Cursor object at 0x7f4e7dd8fa80>
>>> r = c.fetchone()
>>> type(r)
<
type
'sqlite3.Row'>
>>>
r
(
u'2006-01-05', u'BUY', u
'RHAT', 100.0, 35.14)
<
class
'sqlite3.Row'>
>>>
tuple(r)
(
'2006-01-05', 'BUY',
'RHAT', 100.0, 35.14)
>>> len(r)
5
>>> r[2]
u
'RHAT'
'RHAT'
>>> r.keys()
['date', 'trans', 'symbol', 'qty', 'price']
>>> r['qty']
100.0
>>> for member in r: print member
>>> for member in r:
... print(member)
...
2006-01-05
BUY
...
...
@@ -647,7 +648,7 @@ This is how SQLite types are converted to Python types by default:
+=============+=============================================+
| ``NULL`` | :const:`None` |
+-------------+---------------------------------------------+
| ``INTEGER`` | :class
`int`
|
| ``INTEGER`` | :class
:`int`
|
+-------------+---------------------------------------------+
| ``REAL`` | :class:`float` |
+-------------+---------------------------------------------+
...
...
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