Skip to content

Commit f6bd50c

Browse files
committed
Fixed contains_updates
1 parent 7d49f7f commit f6bd50c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

neo4j/v1/session.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ class SummaryCounters(object):
291291
""" Set of statistics from a Cypher statement execution.
292292
"""
293293

294-
#:
295-
contains_updates = False
296-
297294
#:
298295
nodes_created = 0
299296

@@ -335,6 +332,14 @@ def __init__(self, statistics):
335332
def __repr__(self):
336333
return repr(vars(self))
337334

335+
@property
336+
def contains_updates(self):
337+
return self.nodes_created or self.nodes_deleted or \
338+
self.relationships_created or self.relationships_deleted or \
339+
self.properties_set or self.labels_added or self.labels_removed or \
340+
self.indexes_added or self.indexes_removed or \
341+
self.constraints_added or self.constraints_removed
342+
338343

339344
#: A plan describes how the database will execute your statement.
340345
#:

0 commit comments

Comments
 (0)