Open tomswinkels opened 1 month ago
Hello @tomswinkels,
Thank you for the question. @exaby73 and I have been discussing this very heavily and are busy implementing it properly. He is sick today, but we hope to circle back to this on Friday!
Any update @transistive and @exaby73 ?
Hello @tomswinkels,
We have thoroughly discussed this as the connection logic is quite complicated.
In more general terms these are some relevant factors:
closeConnections
method here https://github.com/neo4j-php/neo4j-php-client/blob/bc4b9e5d7c47cb222b6ab508b51fcc5dd7b3acba/src/Basic/Driver.php#L61. This actually clears the routing tables connections but is very dangerous as it will break any running transactions.A long story short: we ended up in a long theoretical discussion of how this disconnecting of the connections would even be needed.
It seems like a valuable learning opportunity for all of us to see how this need arose, because under the current architecture exposing a single connection in the client, driver or session object is simply impossible.
I'll ping you in the internal slack to discuss further.
Hi,
Is there an option to close the connection?
Like
$client->disconnect();
?In the bolt client, there is an option for it -> https://github.com/neo4j-php/neo4j-php-client/blob/c91a479a10f0d955eeab28618547a2373119ff99/src/Bolt/Connection.php#L45