47
47
"kerberos_auth" ,
48
48
]
49
49
50
+ BOLT_VERSION_1 = 1
51
+ BOLT_VERSION_2 = 2
52
+ BOLT_VERSION_3 = 3
53
+
50
54
try :
51
55
from neobolt .exceptions import (
52
56
ConnectionExpired ,
@@ -1077,10 +1081,10 @@ class BoltStatementResultSummary(object):
1077
1081
#: A :class:`.ProfiledPlan` instance
1078
1082
profile = None
1079
1083
1080
- #: The time it took for the server to have the result available.
1084
+ #: The time it took for the server to have the result available. (milliseconds)
1081
1085
result_available_after = None
1082
1086
1083
- #: The time it took for the server to consume the result.
1087
+ #: The time it took for the server to consume the result. (milliseconds)
1084
1088
result_consumed_after = None
1085
1089
1086
1090
#: Notifications provide extra information for a user executing a statement.
@@ -1097,10 +1101,12 @@ def __init__(self, **metadata):
1097
1101
self .parameters = metadata .get ("parameters" )
1098
1102
self .statement_type = metadata .get ("type" )
1099
1103
self .counters = SummaryCounters (metadata .get ("stats" , {}))
1100
- self .result_available_after = metadata .get ("result_available_after" )
1101
- self .result_consumed_after = metadata .get ("result_consumed_after" )
1102
- self .t_first = metadata .get ("t_first" )
1103
- self .t_last = metadata .get ("t_last" )
1104
+ if self .protocol_version < BOLT_VERSION_3 :
1105
+ self .result_available_after = metadata .get ("result_available_after" )
1106
+ self .result_consumed_after = metadata .get ("result_consumed_after" )
1107
+ else :
1108
+ self .result_available_after = metadata .get ("t_first" )
1109
+ self .result_consumed_after = metadata .get ("t_last" )
1104
1110
if "plan" in metadata :
1105
1111
self .plan = _make_plan (metadata ["plan" ])
1106
1112
if "profile" in metadata :
0 commit comments