Skip to content

Commit

Permalink
at_end()->at_end
Browse files Browse the repository at this point in the history
  • Loading branch information
technige committed Feb 22, 2016
1 parent 48c180d commit 16c7e1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_transaction_commit(self):
cursor = session.run("MATCH (p:Person {name: 'The One'}) RETURN count(p)")
assert cursor.next()
assert cursor["count(p)"] == 1
assert cursor.at_end()
assert cursor.at_end
session.close()

def test_transaction_rollback(self):
Expand All @@ -165,7 +165,7 @@ def test_transaction_rollback(self):
cursor = session.run("MATCH (p:Person {name: 'The One'}) RETURN count(p)")
assert cursor.next()
assert cursor["count(p)"] == 0
assert cursor.at_end()
assert cursor.at_end
session.close()

def test_result_summary_query_profile(self):
Expand Down
3 changes: 2 additions & 1 deletion neo4j/v1/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def position(self):
"""
return self._position

@property
def at_end(self):
""" Return ``True`` if at the end of the record stream, ``False``
otherwise.
Expand All @@ -186,7 +187,7 @@ def at_end(self):
return True
else:
self._connection.fetch()
return self.at_end()
return self.at_end

def stream(self):
""" Yield all subsequent records.
Expand Down

0 comments on commit 16c7e1e

Please sign in to comment.