-
Notifications
You must be signed in to change notification settings - Fork 69
5.X Change Log
- the
Neo4j.Driver.Experimental
namespace has been renamed toNeo4j.Driver.Preview
. This will be a compile-time breaking change for any code using this namespace. No functionality has been changed.
- Introduce
IDriver.TryVerifyConnectivityAsync
#693 #See issue - Notifications Updates #691 Introduce better notifications, and configuration(Docs).
Introduce NotificationSeverity
enum represents to represent a notification's severity level.
Warning
Information
Unknown
Introduce NotificationCategory
enum represents to represent a notification's category.
Hint
Unrecognized
Unsupported
Performance
Deprecation
Generic
Unknown
The INotification
interface extended with 4 new properties:
NotificationSeverity SeverityLevel
string RawSeverityLevel
NotificationCategory Category
string RawCategory
The Raw
prefixed properties return an unparsed string
representation returned by the server.
In case of an unrecognised values, both SeverityLevel
and Category
will be Unknown
.
This may happen if a new value is introduced in a future server version and a previous driver version does not support it.
Additionally, Unknown
may be returned when driver communicates with a server version that does not supply these values.
The Severity
property has been deprecated in favour of the RawSeverityLevel
property.
Introduce INotificationConfig
type has been introduced to allow notification preferences management.
By default, the server determines what notifications are provided to the driver.
However, user can set a minimum severity level and/or a set of disabled notification categories to manage its expectations.
This feature is only supported on Bolt protocol version 5.2(Introduced in server 5.7) and above.
Both the Config
and the SessionConfig
support this new configuration, configured with builders:
-
ConfigBuilder.WithNotificationsDisabled
5.7 API Doc -
ConfigBuilder.WithNotifications
5.7 API Doc -
SessionConfigBuilder.WithNotificationsDisabled
5.7 API Doc -
SessionConfigBuilder.WithNotifications
5.7 API Doc
Introduce Severity
(API Docs) & Category
(API Docs) enums for configuration.
Servers will assess which notifications to emit based on a hierarchy, using the most recently declared values.
using var driver = GraphDatabase.Driver("neo4j+s//auradb", AuthToken, cb => cb.WithNotificationsDisabled());
using var session = driver.AsyncSession();
...
var summary = await cursor.ConsumeAsync();
// No notifications should be emitted.
// This is useful for helping the server optimize operations as the server doesn't need to assess for any notifications.
// Notifications are not sent over the wire too meaning less data!
Debug.Assert(summary.Notifications.Count() == 0);
Severity configuration sets the minimum level of a notification, while category confugration is used to disable a category.
using var driver = GraphDatabase.Driver("neo4j+s//auradb", AuthToken, cb => cb.WithNotifications(Severity.Warning, null));
using var session = driver.AsyncSession(scb => scb.WithNotifications(null, new []{Category.Performance}));
...
var summary = await cursor.ConsumeAsync();
// no Information or performance notifications emitted.
Debug.Assert(summary.Notifications.Count(x =>
x.NotificationCategory == NotificationCategory.Performance ||
x.NotificationSeverity == NotificationSeverity.Information) == 0);
if you require to enable a previously disabled categories for a session you can emit it from disabledCategories
parameter.
using var driver = GraphDatabase.Driver("neo4j+s//auradb", AuthToken, cb => cb.WithNotifications(null, new []{Category.Performance}));
using var session = driver.AsyncSession(scb => scb.WithNotifications(null, new Category[]{}));
...
var summary = await cursor.ConsumeAsync();
// Notifications can contain anything again!
This update includes support for both 5.1 and 5.2 versions. The latter is required for the full support of the new notification updates.
No changes.
- The
IsRetriable
property on exceptions is now public
- The
ExecutableQuery
API has been added to theExperimental
namespace (see here for more information)
- Add documentation for SessionConfigBuilder.WithDatabase and SessionConfig.Database
- Exclude test code in snyk code analysis
- TestKit backend: exclude txMeta from Cypher types
- Add new exception types and change to explicitly identifying fast fail errors
- Remove database notions from bookmark manager.
- Fix Bookmark manager references outside of Neo4j.Driver.Experimental namespace.
- When replacing LastBookmark with LastBookmarks we accidentally removed the old property, not following the planned deprecation policy. It is now restored and marked as obsolete, and due for removal in 6.0 of the driver.
- Simplify creation of bookmark manager with default config.
- Fixed an issue bookmark manager experimental classes: correctly exposing
WithBookmarkManager
to use bookmark managers on session configuration(#654).
No changes.
No changes.
final tidying for major release.
- Introduce Experimental Bookmark Manager. (Not recommended for production use currently.) (#632)
- Using
Neo4j.Driver.Experimental.GraphDatabase.BookmarkManagerFactory
users can create anIBookmarkManager
. -
IBookmarkManager
can be passed toSessionConfigBuilder
when creating a creating a session by using theNeo4j.Driver.Experimental.ExperimentalExtensions
to addWithBookmarkManager
toSessionConfigBuilder
. - The Experimental methods will be finalized as:
-
Neo4j.Driver.Experimental.GraphDatabase.BookmarkManagerFactory
->Neo4j.Driver.GraphDatabase.BookmarkManagerFactory
-
Neo4j.Driver.Experimental.ExperimentalExtensions
->Neo4j.Driver.SessionConfigBuilder
.
-
- Using
- Transaction lifetimes. (#640)
⚠️ remaining managed transactions have been deprecated and replaced, removing the ability to commit or rollback transactions inside the unit of work scope.-
ISession.ReadTransaction
->ISession.ExecuteRead
-
ISession.WriteTransaction
->ISession.ExecuteWrite
-
IRxSession.ReadTransaction
->IRxSession.ExecuteRead
-
IRxSession.WriteTransaction
->IRxSession.ExecuteWrite
-
- Removal of 4.X Deprecations
- Removal of
IServerInfo.Version
(#638)
- Removal of
This release introduces full support for Neo4j 5.0 Servers.
We now release for .NET 6.0 and .NET Standard 2.0.
- Support for Bolt protocol version
5.0
- SSL Configuration(#585)
- SSL certificate trust rules can be set on driver initialization using
ConfigBuilder.WithCertificateTrustRule
-
CertificateTrustRule.TrustSystem
- Will verify certificates against the system's Certificate Authority store.
-
CertificateTrustRule.TrustList
- Users can specify a collection of X509Certificate2 or paths to load as trusted certificates.
-
CertificateTrustRule.TrustAny
- Will trust any SSL Cert.
-
⚠️ Users can not use bothConfigBuilder.WithCertificateTrustRule
and+s
/+ssc
in the url scheme at the same time.
- SSL certificate trust rules can be set on driver initialization using
- Added
Driver.GetServerInfoAsync
. (#605)- Will verify connectivity and return a
IServerInfo
detailing server summary.
- Will verify connectivity and return a
- Added
CanBeRetried
toException
. (#613)- All errors from driver that can be resolved by retrying an operation will return true.
- Add
IsOpen
to Result cursors. (#610)-
IsOpen
will return if the underlying cursor is open to read records; Attempting to read from a closed cursor will throw aResultConsumedException
.
-
- Connection Acquisition Timeout (#588)
-
ConfigBuilder.WithConnectionAcquisitionTimeout
allows users to set maximum wait time to get a connection from the pool or create a new connection on driver initialization. ⚠️ default: 60 seconds
-
- Transaction lifetimes. (#612)
⚠️ Async managed transactions have been deprecated and replaced, removing the ability to commit or rollback transactions inside the unit of work scope.-
IAsyncSession.ReadTransactionAsync
->IAsyncSession.ExecuteReadAsync
-
IAsyncSession.WriteTransactionAsync
->IAsyncSession.ExecuteWriteAsync
-
- Attempting close a transaction after it has been closed will now throw a
TransactionClosedException
.
- Rename Bookmark to Bookmarks. (#609)
⚠️ Due to a mix of languageBookmark
and all references to bookmarks have been pluralized as it allows for multiple values.-
Bookmark
->Bookmarks
-
Session.LastBookmark
->Session.LastBookmarks
-
SessionConfigBuilder.WithBookmarks(Bookmark[])
->SessionConfigBuilder.WithBookmarks(Bookmarks[])
- Transaction timeout (#574)
-
TransactionConfigBuilder.WithTimeout
now acceptsNullable<TimeSpan>
for timeout.⚠️ null
will use the server's default transaction timeout.⚠️ TimeSpan.Zero
will remove timeout from transaction.
-
- No longer throwing when using APOC procedures in a profiled query. (#633)
- Discovery exceptions. (#594)
- Error message handling. (#592)
Full Changelog: https://github.com/neo4j/neo4j-dotnet-driver/compare/4.4.0...5.0.0-beta01