20
20
21
21
22
22
class Cursor (object ):
23
- '''
23
+ """
24
24
This is the object you use to interact with the database.
25
- '''
25
+ """
26
26
27
27
#: Max stetement size which :meth:`executemany` generates.
28
28
#:
@@ -33,10 +33,10 @@ class Cursor(object):
33
33
_defer_warnings = False
34
34
35
35
def __init__ (self , connection ):
36
- '''
36
+ """
37
37
Do not create an instance of a Cursor yourself. Call
38
38
connections.Connection.cursor().
39
- '''
39
+ """
40
40
self .connection = connection
41
41
self .description = None
42
42
self .rownumber = 0
@@ -48,9 +48,9 @@ def __init__(self, connection):
48
48
self ._warnings_handled = False
49
49
50
50
def close (self ):
51
- '''
51
+ """
52
52
Closing a cursor just exhausts all remaining data.
53
- '''
53
+ """
54
54
conn = self .connection
55
55
if conn is None :
56
56
return
@@ -274,7 +274,7 @@ def callproc(self, procname, args=()):
274
274
return args
275
275
276
276
def fetchone (self ):
277
- ''' Fetch the next row '''
277
+ """ Fetch the next row"""
278
278
self ._check_executed ()
279
279
if self ._rows is None or self .rownumber >= len (self ._rows ):
280
280
return None
@@ -283,7 +283,7 @@ def fetchone(self):
283
283
return result
284
284
285
285
def fetchmany (self , size = None ):
286
- ''' Fetch several rows '''
286
+ """ Fetch several rows"""
287
287
self ._check_executed ()
288
288
if self ._rows is None :
289
289
return ()
@@ -293,7 +293,7 @@ def fetchmany(self, size=None):
293
293
return result
294
294
295
295
def fetchall (self ):
296
- ''' Fetch all the rows '''
296
+ """ Fetch all the rows"""
297
297
self ._check_executed ()
298
298
if self ._rows is None :
299
299
return ()
@@ -444,11 +444,11 @@ def nextset(self):
444
444
return self ._nextset (unbuffered = True )
445
445
446
446
def read_next (self ):
447
- """ Read next row """
447
+ """Read next row"""
448
448
return self ._conv_row (self ._result ._read_rowdata_packet_unbuffered ())
449
449
450
450
def fetchone (self ):
451
- """ Fetch next row """
451
+ """Fetch next row"""
452
452
self ._check_executed ()
453
453
row = self .read_next ()
454
454
if row is None :
@@ -477,7 +477,7 @@ def __iter__(self):
477
477
return self .fetchall_unbuffered ()
478
478
479
479
def fetchmany (self , size = None ):
480
- """ Fetch many """
480
+ """Fetch many"""
481
481
self ._check_executed ()
482
482
if size is None :
483
483
size = self .arraysize
@@ -517,4 +517,4 @@ def scroll(self, value, mode='relative'):
517
517
518
518
519
519
class SSDictCursor (DictCursorMixin , SSCursor ):
520
- """ An unbuffered cursor, which returns results as a dictionary """
520
+ """An unbuffered cursor, which returns results as a dictionary"""
0 commit comments