From 35a244bfd3657451fce3ba85e80cbecc06e46854 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:21:43 +0100 Subject: [PATCH 1/4] add note that explicit transactions do not support CALL IN TRANSACTIONS --- packages/core/src/session.ts | 8 ++++++++ packages/neo4j-driver-deno/lib/core/session.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index f08318569..560e5deb3 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -446,6 +446,10 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * + * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using + * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call + * {@link Session#run} for these). + * * @param {function(tx: ManagedTransaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. * @param {TransactionConfig} [transactionConfig] - Configuration for all transactions started to execute the unit of work. @@ -468,6 +472,10 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * + * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using + * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call + * {@link Session#run} for these). + * * @param {function(tx: ManagedTransaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. * @param {TransactionConfig} [transactionConfig] - Configuration for all transactions started to execute the unit of work. diff --git a/packages/neo4j-driver-deno/lib/core/session.ts b/packages/neo4j-driver-deno/lib/core/session.ts index 8dce7b804..60745f1be 100644 --- a/packages/neo4j-driver-deno/lib/core/session.ts +++ b/packages/neo4j-driver-deno/lib/core/session.ts @@ -445,6 +445,10 @@ class Session { * Some failures of the given function or the commit itself will be retried with exponential backoff with initial * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. + * + * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using + * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call + * {@link Session#run} for these). * * @param {function(tx: ManagedTransaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. @@ -467,6 +471,10 @@ class Session { * Some failures of the given function or the commit itself will be retried with exponential backoff with initial * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. + * + * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using + * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call + * {@link Session#run} for these). * * @param {function(tx: ManagedTransaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. From e90a283322bbafd26bc0a1c4e7f6627e143ea76a Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:43:31 +0100 Subject: [PATCH 2/4] standardize usage of link tag in deprecations --- packages/core/src/session.ts | 6 +++--- packages/neo4j-driver-deno/lib/core/session.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index 560e5deb3..d9b58ae25 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -351,7 +351,7 @@ class Session { /** * Return the bookmarks received following the last completed {@link Transaction}. * - * @deprecated This method will be removed in version 6.0. Please, use Session#lastBookmarks instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#lastBookmarks} instead. * * @return {string[]} A reference to a previous transaction. * @see {@link Session#lastBookmarks} @@ -385,7 +385,7 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * - * @deprecated This method will be removed in version 6.0. Please, use Session#executeRead instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#executeRead} instead. * * @param {function(tx: Transaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. @@ -410,7 +410,7 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * - * @deprecated This method will be removed in version 6.0. Please, use Session#executeWrite instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#executeWrite} instead. * * @param {function(tx: Transaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. diff --git a/packages/neo4j-driver-deno/lib/core/session.ts b/packages/neo4j-driver-deno/lib/core/session.ts index 60745f1be..f0c6e6d2b 100644 --- a/packages/neo4j-driver-deno/lib/core/session.ts +++ b/packages/neo4j-driver-deno/lib/core/session.ts @@ -351,7 +351,7 @@ class Session { /** * Return the bookmarks received following the last completed {@link Transaction}. * - * @deprecated This method will be removed in version 6.0. Please, use Session#lastBookmarks instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#lastBookmarks} instead. * * @return {string[]} A reference to a previous transaction. * @see {@link Session#lastBookmarks} @@ -385,7 +385,7 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * - * @deprecated This method will be removed in version 6.0. Please, use Session#executeRead instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#executeRead} instead. * * @param {function(tx: Transaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. @@ -410,7 +410,7 @@ class Session { * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. * - * @deprecated This method will be removed in version 6.0. Please, use Session#executeWrite instead. + * @deprecated This method will be removed in version 6.0. Please, use {@link Session#executeWrite} instead. * * @param {function(tx: Transaction): Promise} transactionWork - Callback that executes operations against * a given {@link Transaction}. @@ -445,7 +445,7 @@ class Session { * Some failures of the given function or the commit itself will be retried with exponential backoff with initial * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. - * + * * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call * {@link Session#run} for these). @@ -471,7 +471,7 @@ class Session { * Some failures of the given function or the commit itself will be retried with exponential backoff with initial * delay of 1 second and maximum retry time of 30 seconds. Maximum retry time is configurable via driver config's * `maxTransactionRetryTime` property in milliseconds. - * + * * NOTE: Because it is an explicit transaction from the server point of view, Cypher queries using * "CALL {} IN TRANSACTIONS" or the older "USING PERIODIC COMMIT" construct will not work (call * {@link Session#run} for these). From 3861bbc2032e095282f8c8d7ccb5e7330fde6111 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:51:51 +0100 Subject: [PATCH 3/4] fixed client certificate links --- packages/core/src/client-certificate.ts | 6 +++--- packages/neo4j-driver-deno/lib/core/client-certificate.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/src/client-certificate.ts b/packages/core/src/client-certificate.ts index d69bb8b03..e78daa1a0 100644 --- a/packages/core/src/client-certificate.ts +++ b/packages/core/src/client-certificate.ts @@ -74,8 +74,8 @@ export default class ClientCertificate { /** * Provides a client certificate to the driver for mutual TLS. * - * The driver will call {@link ClientCertificateProvider#hasUpdate()} to check if the client wants to update the certificate. - * If so, it will call {@link ClientCertificateProvider#getCertificate()} to get the new certificate. + * The driver will call {@link ClientCertificateProvider#hasUpdate} to check if the client wants to update the certificate. + * If so, it will call {@link ClientCertificateProvider#getClientCertificate} to get the new certificate. * * The certificate is only used as a second factor for authentication authenticating the client. * The DMBS user still needs to authenticate with an authentication token. @@ -103,7 +103,7 @@ export class ClientCertificateProvider { /** * Returns the certificate to use for new connections. * - * Will be called by the driver after {@link ClientCertificateProvider#hasUpdate()} returned true + * Will be called by the driver after {@link ClientCertificateProvider#hasUpdate} returned true * or when the driver establishes the first connection. * * @returns {Promise|ClientCertificate} the certificate to use for new connections diff --git a/packages/neo4j-driver-deno/lib/core/client-certificate.ts b/packages/neo4j-driver-deno/lib/core/client-certificate.ts index 7a338068b..144b2c12b 100644 --- a/packages/neo4j-driver-deno/lib/core/client-certificate.ts +++ b/packages/neo4j-driver-deno/lib/core/client-certificate.ts @@ -74,8 +74,8 @@ export default class ClientCertificate { /** * Provides a client certificate to the driver for mutual TLS. * - * The driver will call {@link ClientCertificateProvider#hasUpdate()} to check if the client wants to update the certificate. - * If so, it will call {@link ClientCertificateProvider#getCertificate()} to get the new certificate. + * The driver will call {@link ClientCertificateProvider#hasUpdate} to check if the client wants to update the certificate. + * If so, it will call {@link ClientCertificateProvider#getClientCertificate} to get the new certificate. * * The certificate is only used as a second factor for authentication authenticating the client. * The DMBS user still needs to authenticate with an authentication token. @@ -103,7 +103,7 @@ export class ClientCertificateProvider { /** * Returns the certificate to use for new connections. * - * Will be called by the driver after {@link ClientCertificateProvider#hasUpdate()} returned true + * Will be called by the driver after {@link ClientCertificateProvider#hasUpdate} returned true * or when the driver establishes the first connection. * * @returns {Promise|ClientCertificate} the certificate to use for new connections From ce6da77be41c9808fd6d4c9be52eb2d03fd7f5bd Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:39:01 +0100 Subject: [PATCH 4/4] fix other link tags with minor issues --- packages/core/src/transaction-promise.ts | 2 +- packages/core/src/types.ts | 2 +- packages/neo4j-driver-deno/lib/core/transaction-promise.ts | 2 +- packages/neo4j-driver-deno/lib/core/types.ts | 2 +- packages/neo4j-driver/src/result-rx.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/src/transaction-promise.ts b/packages/core/src/transaction-promise.ts index af184fa70..fb3985dde 100644 --- a/packages/core/src/transaction-promise.ts +++ b/packages/core/src/transaction-promise.ts @@ -27,7 +27,7 @@ import { TxConfig } from './internal/tx-config' import NotificationFilter from './notification-filter' /** - * Represents a {@link Promise} object and a {@link Transaction} object. + * Represents a Promise<{@link Transaction}> object and a {@link Transaction} object. * * Resolving this object promise verifies the result of the transaction begin and returns the {@link Transaction} object in case of success. * diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 5e63b9ff1..348eef2c9 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -298,7 +298,7 @@ export class Config { this.resolver = undefined /** - * Configure filter for Notification objects returned in {@Link ResultSummary#notifications}. + * Configure filter for Notification objects returned in {@link ResultSummary#notifications}. * * See {@link SessionConfig#notificationFilter} for usage instructions. * diff --git a/packages/neo4j-driver-deno/lib/core/transaction-promise.ts b/packages/neo4j-driver-deno/lib/core/transaction-promise.ts index 66eb5b79c..375fa3916 100644 --- a/packages/neo4j-driver-deno/lib/core/transaction-promise.ts +++ b/packages/neo4j-driver-deno/lib/core/transaction-promise.ts @@ -27,7 +27,7 @@ import { TxConfig } from './internal/tx-config.ts' import NotificationFilter from './notification-filter.ts' /** - * Represents a {@link Promise} object and a {@link Transaction} object. + * Represents a Promise<{@link Transaction}> object and a {@link Transaction} object. * * Resolving this object promise verifies the result of the transaction begin and returns the {@link Transaction} object in case of success. * diff --git a/packages/neo4j-driver-deno/lib/core/types.ts b/packages/neo4j-driver-deno/lib/core/types.ts index d493c400d..91d652fc8 100644 --- a/packages/neo4j-driver-deno/lib/core/types.ts +++ b/packages/neo4j-driver-deno/lib/core/types.ts @@ -298,7 +298,7 @@ export class Config { this.resolver = undefined /** - * Configure filter for Notification objects returned in {@Link ResultSummary#notifications}. + * Configure filter for Notification objects returned in {@link ResultSummary#notifications}. * * See {@link SessionConfig#notificationFilter} for usage instructions. * diff --git a/packages/neo4j-driver/src/result-rx.js b/packages/neo4j-driver/src/result-rx.js index 7f0dfe748..dee711f99 100644 --- a/packages/neo4j-driver/src/result-rx.js +++ b/packages/neo4j-driver/src/result-rx.js @@ -121,7 +121,7 @@ export default class RxResult { * * This method won't need to be called in normal stream operation. It only applies to the case when the stream is paused. * - * This method is method won't start the consuming records if the ${@link records()} stream didn't get subscribed. + * This method is method won't start the consuming records if the {@link records} stream didn't get subscribed. * @experimental * @returns {Promise} - A promise that resolves when the stream is resumed. */