@@ -132,7 +132,7 @@ def __init__(self, connection, statement, parameters):
132132 self ._keys = None
133133 self ._connection = connection
134134 self ._current = None
135- self ._next = deque ()
135+ self ._record_buffer = deque ()
136136 self ._position = - 1
137137 self ._summary = None
138138 self ._consumed = False
@@ -154,15 +154,15 @@ def next(self):
154154 """ Advance to the next record, if available, and return a boolean
155155 to indicate whether or not the cursor has moved.
156156 """
157- if self ._next :
158- values = self ._next .popleft ()
157+ if self ._record_buffer :
158+ values = self ._record_buffer .popleft ()
159159 self ._current = Record (self .keys (), tuple (map (hydrated , values )))
160160 self ._position += 1
161161 return True
162162 elif self ._consumed :
163163 return False
164164 else :
165- self ._connection .fetch_next ()
165+ self ._connection .fetch ()
166166 return self .next ()
167167
168168 def record (self ):
@@ -179,12 +179,12 @@ def at_end(self):
179179 """ Return ``True`` if at the end of the record stream, ``False``
180180 otherwise.
181181 """
182- if self ._next :
182+ if self ._record_buffer :
183183 return False
184184 elif self ._consumed :
185185 return True
186186 else :
187- self ._connection .fetch_next ()
187+ self ._connection .fetch ()
188188 return self .at_end ()
189189
190190 def stream (self ):
@@ -204,7 +204,7 @@ def keys(self):
204204 """
205205 # Fetch messages until we have the header or a failure
206206 while self ._keys is None and not self ._consumed :
207- self ._connection .fetch_next ()
207+ self ._connection .fetch ()
208208 return self ._keys
209209
210210 def get (self , item , default = None ):
@@ -226,17 +226,17 @@ def summarize(self):
226226
227227 def _consume (self ):
228228 # Consume the remainder of this result, triggering all appropriate callback functions.
229- fetch_next = self ._connection .fetch_next
229+ fetch = self ._connection .fetch
230230 while not self ._consumed :
231- fetch_next ()
231+ fetch ()
232232
233233 def _on_header (self , metadata ):
234234 # Called on receipt of the result header.
235235 self ._keys = metadata ["fields" ]
236236
237237 def _on_record (self , values ):
238238 # Called on receipt of each result record.
239- self ._next .append (values )
239+ self ._record_buffer .append (values )
240240
241241 def _on_footer (self , metadata ):
242242 # Called on receipt of the result footer.
0 commit comments