Skip to content

Commit 735dd96

Browse files
authored
Add notification classification SCHEMA (#1086)
1 parent da79a0a commit 735dd96

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/neo4j/_api.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ class NotificationDisabledCategory(str, Enum):
156156
157157
.. versionchanged:: 5.14
158158
Added categories :attr:`.SECURITY` and :attr:`.TOPOLOGY`.
159+
160+
.. versionchanged:: 5.24
161+
Added category :attr:`.SCHEMA`.
159162
"""
160163

161164
HINT = "HINT"
@@ -167,6 +170,8 @@ class NotificationDisabledCategory(str, Enum):
167170
SECURITY = "SECURITY"
168171
#: Requires server version 5.13 or newer.
169172
TOPOLOGY = "TOPOLOGY"
173+
#: Requires server version 5.17 or newer.
174+
SCHEMA = "SCHEMA"
170175

171176

172177
class NotificationDisabledClassification(str, Enum):
@@ -188,6 +193,9 @@ class NotificationDisabledClassification(str, Enum):
188193
:ref:`session-notifications-disabled-classifications-ref`
189194
190195
.. versionadded:: 5.22
196+
197+
.. versionchanged:: 5.24
198+
Added classification :attr:`.SCHEMA`.
191199
"""
192200

193201
HINT = "HINT"
@@ -199,6 +207,8 @@ class NotificationDisabledClassification(str, Enum):
199207
SECURITY = "SECURITY"
200208
#: Requires server version 5.13 or newer.
201209
TOPOLOGY = "TOPOLOGY"
210+
#: Requires server version 5.17 or newer.
211+
SCHEMA = "SCHEMA"
202212

203213

204214
if t.TYPE_CHECKING:
@@ -214,6 +224,7 @@ class NotificationDisabledClassification(str, Enum):
214224
"GENERIC",
215225
"SECURITY",
216226
"TOPOLOGY",
227+
"SCHEMA",
217228
],
218229
]
219230
__all__.append("T_NotificationDisabledCategory")
@@ -239,6 +250,9 @@ class NotificationCategory(str, Enum):
239250
240251
.. versionchanged:: 5.14
241252
Added categories :attr:`.SECURITY` and :attr:`.TOPOLOGY`.
253+
254+
.. versionchanged:: 5.24
255+
Added category :attr:`.SCHEMA`.
242256
"""
243257

244258
HINT = "HINT"
@@ -249,6 +263,7 @@ class NotificationCategory(str, Enum):
249263
GENERIC = "GENERIC"
250264
SECURITY = "SECURITY"
251265
TOPOLOGY = "TOPOLOGY"
266+
SCHEMA = "SCHEMA"
252267
#: Used when the server provides a Category which the driver is unaware of.
253268
#: This can happen when connecting to a server newer than the driver or
254269
#: before notification categories were introduced.
@@ -270,6 +285,9 @@ class NotificationClassification(str, Enum):
270285
.. seealso:: :attr:`.GqlStatusObject.classification`
271286
272287
.. versionadded:: 5.22
288+
289+
.. versionchanged:: 5.24
290+
Added classification :attr:`.SCHEMA`.
273291
"""
274292

275293
HINT = "HINT"
@@ -280,6 +298,7 @@ class NotificationClassification(str, Enum):
280298
GENERIC = "GENERIC"
281299
SECURITY = "SECURITY"
282300
TOPOLOGY = "TOPOLOGY"
301+
SCHEMA = "SCHEMA"
283302
#: Used when the server provides a Category which the driver is unaware of.
284303
#: This can happen when connecting to a server newer than the driver or
285304
#: before notification categories were introduced.

src/neo4j/_work/summary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ def __str__(self) -> str:
456456
"GENERIC": NotificationCategory.GENERIC,
457457
"SECURITY": NotificationCategory.SECURITY,
458458
"TOPOLOGY": NotificationCategory.TOPOLOGY,
459+
"SCHEMA": NotificationCategory.SCHEMA,
459460
}
460461

461462
_CLASSIFICATION_LOOKUP: t.Dict[t.Any, NotificationClassification] = {

tests/unit/common/work/test_summary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,7 @@ def _make_summary_notification(
21642164
("GENERIC", NotificationCategory.GENERIC),
21652165
("SECURITY", NotificationCategory.SECURITY),
21662166
("TOPOLOGY", NotificationCategory.TOPOLOGY),
2167+
("SCHEMA", NotificationCategory.SCHEMA),
21672168
)
21682169
),
21692170
*(

0 commit comments

Comments
 (0)