Skip to content

Commit ae4400c

Browse files
committed
Removed fetch_all
1 parent 247f1ba commit ae4400c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

neo4j/connection.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ def on_failure(metadata):
235235

236236
self.append(INIT, (user_agent,), response=response)
237237
self.send()
238-
self.fetch_all(response)
238+
fetch_next = self.fetch_next
239+
while not response.complete:
240+
fetch_next()
239241

240242
def append(self, signature, fields=(), response=None):
241243
""" Add a message to the outgoing queue.
@@ -283,11 +285,6 @@ def fetch_next(self):
283285
self.append(ACK_FAILURE, response=AckFailureResponse(self))
284286
raw.close()
285287

286-
def fetch_all(self, response):
287-
fetch_next = self.fetch_next
288-
while not response.complete:
289-
fetch_next()
290-
291288
def close(self):
292289
""" Shut down and close the connection.
293290
"""

neo4j/session.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ def run(self, statement, parameters=None):
172172
self.connection.send()
173173
t.end_send = perf_counter()
174174

175-
self.connection.fetch_all(run_response)
176-
self.connection.fetch_all(pull_all_response)
175+
fetch_next = self.connection.fetch_next
176+
while not pull_all_response.complete:
177+
fetch_next()
178+
177179
t.done = perf_counter()
178180
self.bench_tests.append(t)
179181

0 commit comments

Comments
 (0)