@@ -33,6 +33,7 @@ class QueryResult(object):
33
33
RELATIONSHIPS_CREATED = 'Relationships created'
34
34
INDICES_CREATED = "Indices created"
35
35
INDICES_DELETED = "Indices deleted"
36
+ CACHED_EXECUTION = "Cached execution"
36
37
INTERNAL_EXECUTION_TIME = 'internal execution time'
37
38
38
39
def __init__ (self , graph , response ):
@@ -64,7 +65,7 @@ def parse_statistics(self, raw_statistics):
64
65
65
66
stats = [self .LABELS_ADDED , self .NODES_CREATED , self .PROPERTIES_SET , self .RELATIONSHIPS_CREATED ,
66
67
self .NODES_DELETED , self .RELATIONSHIPS_DELETED , self .INDICES_CREATED , self .INDICES_DELETED ,
67
- self .INTERNAL_EXECUTION_TIME ]
68
+ self .CACHED_EXECUTION , self . INTERNAL_EXECUTION_TIME ]
68
69
for s in stats :
69
70
v = self ._get_value (s , raw_statistics )
70
71
if v is not None :
@@ -227,6 +228,7 @@ def _get_value(prop, statistics):
227
228
if prop in stat :
228
229
return float (stat .split (': ' )[1 ].split (' ' )[0 ])
229
230
231
+
230
232
return None
231
233
232
234
def _get_stat (self , stat ):
@@ -264,6 +266,10 @@ def indices_created(self):
264
266
def indices_deleted (self ):
265
267
return self ._get_stat (self .INDICES_DELETED )
266
268
269
+ @property
270
+ def cached_execution (self ):
271
+ return self ._get_stat (self .CACHED_EXECUTION ) == 1
272
+
267
273
@property
268
274
def run_time_ms (self ):
269
275
return self ._get_stat (self .INTERNAL_EXECUTION_TIME )
0 commit comments