Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions neo4j/v1/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def __init__(self, statement, parameters, **metadata):
if position is not None:
position = Position(position["offset"], position["line"], position["column"])
self.notifications.append(Notification(notification["code"], notification["title"],
notification["description"], position))
notification["description"], notification["severity"], position))


class Counters(object):
Expand Down Expand Up @@ -416,9 +416,11 @@ def __repr__(self):
#: a short summary of the notification
#: description:
#: a long description of the notification
#: severity:
#: the severity level of the notification
#: position:
#: the position in the statement where this notification points to, if relevant.
Notification = namedtuple("Notification", ("code", "title", "description", "position"))
Notification = namedtuple("Notification", ("code", "title", "description", "severity", "position"))

#: A position within a statement, consisting of offset, line and column.
#:
Expand Down
1 change: 1 addition & 0 deletions test/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def test_can_obtain_notification_info(self):
assert notification.code == "Neo.ClientNotification.Statement.CartesianProduct"
assert notification.title == "This query builds a cartesian product between " \
"disconnected patterns."
assert notification.severity == "WARNING"
assert notification.description == "If a part of a query contains multiple " \
"disconnected patterns, this will build a " \
"cartesian product between all those parts. This " \
Expand Down