Skip to content

Commit ade8503

Browse files
authored
Deprecate dangling elements of the Notification API (#1326)
1 parent 79a0c52 commit ade8503

File tree

6 files changed

+30
-24
lines changed

6 files changed

+30
-24
lines changed

packages/core/src/driver.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,14 @@ class SessionConfig {
271271
* This configuration enables filter notifications by:
272272
*
273273
* * the minimum severity level ({@link NotificationFilterMinimumSeverityLevel})
274-
* * disabling notification categories ({@link NotificationFilterDisabledCategory})
274+
* * disabling notification classification ({@link NotificationFilterDisabledClassification})
275275
*
276276
*
277277
* Disabling notifications can be done by defining the minimum severity level to 'OFF'.
278278
* At driver level, when omitted, uses the server's default.
279279
* At session level, when omitted, defaults to what filters have been configured at driver level.
280280
*
281-
* Disabling categories or severities allows the server to skip analysis for those, which can speed up query
281+
* Disabling classifications or severities allows the server to skip analysis for those, which can speed up query
282282
* execution.
283283
*
284284
* @example
@@ -287,9 +287,9 @@ class SessionConfig {
287287
* database: 'neo4j',
288288
* notificationFilter: {
289289
* minimumSeverityLevel: neo4j.notificationFilterMinimumSeverityLevel.WARNING, // or 'WARNING
290-
* disabledCategories: [
291-
* neo4j.notificationFilterDisabledCategory.HINT, // or 'HINT'
292-
* neo4j.notificationFilterDisabledCategory.DEPRECATION // or 'DEPRECATION'
290+
* disabledClassifications: [
291+
* neo4j.notificationFilterDisabledClassification.HINT, // or 'HINT'
292+
* neo4j.notificationFilterDisabledClassification.DEPRECATION // or 'DEPRECATION'
293293
* ]
294294
* }
295295
* })
@@ -309,18 +309,18 @@ class SessionConfig {
309309
* // or driver.session({ database: 'neo4j', notificationFilter: undefined })
310310
*
311311
* // using default minimum severity level, but disabling 'HINT' and 'UNRECOGNIZED'
312-
* // notification categories
312+
* // notification classifications
313313
* const sessionWithDefaultSeverityLevel = driver.session({
314314
* database: 'neo4j',
315315
* notificationFilter: {
316-
* disabledCategories: [
317-
* neo4j.notificationFilterDisabledCategory.HINT, // or 'HINT'
318-
* neo4j.notificationFilterDisabledCategory.UNRECOGNIZED // or 'UNRECOGNIZED'
316+
* disabledClassifications: [
317+
* neo4j.notificationFilterDisabledClassification.HINT, // or 'HINT'
318+
* neo4j.notificationFilterDisabledClassification.UNRECOGNIZED // or 'UNRECOGNIZED'
319319
* ]
320320
* }
321321
* })
322322
*
323-
* // using default disabled categories, but configuring minimum severity level to 'WARNING'
323+
* // using default disabled classifications, but configuring minimum severity level to 'WARNING'
324324
* const sessionWithDefaultSeverityLevel = driver.session({
325325
* database: 'neo4j',
326326
* notificationFilter: {

packages/core/src/notification-filter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type NotificationFilterDisabledCategory = ExcludeUnknown<NotificationCategory>
4444
*/
4545
/**
4646
* Constants that represents the disabled categories in the {@link NotificationFilter}
47+
* @deprecated use {@link notificationFilterDisabledClassification} instead.
4748
*/
4849
const notificationFilterDisabledCategory: EnumRecord<NotificationFilterDisabledCategory> = {
4950
HINT: 'HINT',
@@ -65,7 +66,7 @@ type NotificationFilterDisabledClassification = ExcludeUnknown<NotificationClass
6566
/**
6667
* Constants that represents the disabled classifications in the {@link NotificationFilter}
6768
*
68-
* @type {notificationFilterDisabledCategory}
69+
* @type {NotificationFilterDisabledClassification}
6970
*/
7071
const notificationFilterDisabledClassification: EnumRecord<NotificationFilterDisabledClassification> = notificationFilterDisabledCategory
7172

@@ -103,6 +104,7 @@ class NotificationFilter {
103104
* and it must not be enabled at same time.
104105
*
105106
* @type {?NotificationFilterDisabledCategory[]}
107+
* @deprecated use{@link NotificationFilter#disabledClassifications}
106108
*/
107109
this.disabledCategories = undefined
108110

packages/core/src/notification.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMAN
6767
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'TOPOLOGY' | 'SECURITY' | 'DEPRECATION' | 'GENERIC' | 'SCHEMA' | 'UNKNOWN' } NotificationCategory
6868
*/
6969
/**
70-
* Constants that represents the Category in the {@link GqlStatusObject}
70+
* Constants that represents the Category in the {@link Notification}
71+
* @deprecated use {@link notificationClassification} instead.
7172
*/
7273
const notificationCategory: { [key in NotificationCategory]: key } = {
7374
HINT: 'HINT',

packages/neo4j-driver-deno/lib/core/driver.ts

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver-deno/lib/core/notification-filter.ts

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver-deno/lib/core/notification.ts

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)