File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -504,7 +504,7 @@ def __iter__(self):
504
504
# Initial fetch from the first POST request
505
505
for row in self ._rows :
506
506
self ._rownumber += 1
507
- yield row
507
+ yield self . _map_row ( self . _experimental_python_types , row , self . _query . columns )
508
508
self ._rows = None
509
509
510
510
# Subsequent fetches from GET requests until next_uri is empty.
@@ -513,15 +513,19 @@ def __iter__(self):
513
513
for row in rows :
514
514
self ._rownumber += 1
515
515
logger .debug ("row %s" , row )
516
- if not self ._experimental_python_types :
517
- yield row
518
- else :
519
- yield self ._map_to_python_types (row , self ._query .columns )
516
+ yield self ._map_row (self ._experimental_python_types , row , self ._query .columns )
520
517
521
518
@property
522
519
def response_headers (self ):
523
520
return self ._query .response_headers
524
521
522
+ @classmethod
523
+ def _map_row (cls , experimental_python_types , row , columns ):
524
+ if not experimental_python_types :
525
+ return row
526
+ else :
527
+ return cls ._map_to_python_types (cls , row , columns )
528
+
525
529
@classmethod
526
530
def _map_to_python_type (cls , item : Tuple [Any , Dict ]) -> Any :
527
531
(value , data_type ) = item
You can’t perform that action at this time.
0 commit comments