Skip to content

Introduce Driver.getServerInfo method #878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 17, 2022

Conversation

bigmontz
Copy link
Contributor

This is part of the drivers unification initiative.

The Driver.verifyConnectivity method was implemented in different ways across the drivers with different returns value. For consistency and clarity about what the method does, the new behaviour of the Driver.verifyConnectivity is check the connectivity with all the readers available and then returns a resolve empty promise in case of success (the promise will be rejected, otherwise).

The Server Info information was moved to the method Driver.getSeverInfo which verifies the connectivity and then returns the ServerInfo of one of the read servers.

For keeping the backwards compatibility, the Driver.verifyConnectivity was deprecated in this version and it should be replace with a version with Promise<void> as return value in the next major release. Driver.getServerInfo should be used instead if the client code needs the server information.

@bigmontz bigmontz marked this pull request as ready for review February 16, 2022 18:14
This is part of the drivers unification initiative.

The `Driver.verifyConnectivity` method was implemented in different ways accross the drivers with
different returns value. For concistency and clarity about what the method does, the new behaviour
of the `Driver.verifyConnectivy` is check the connectivity with all the readers available and then
returns a resolve empty promise in case of success (the promise will be rejected, otherwise).

The Server Info information was moved to the method `Driver.getSeverInfo` which verifies the
connectivity and then returnt the `ServerInfo` of one of the read servers.

For keeping the backwards compatibility, the `Driver.verifyConnectivity` was depreacted in this version
and it should be replace with a version with `Promise<void>` as return value in the next major release.
`Driver.getServerInfo` should be used instead if the client code needs server information.
@bigmontz bigmontz force-pushed the 5.0-get-server-info branch from d62b190 to 0123eeb Compare February 17, 2022 09:53
@bigmontz bigmontz merged commit 532f027 into neo4j:5.0 Feb 17, 2022
@bigmontz bigmontz deleted the 5.0-get-server-info branch February 17, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant