Skip to content

Commit 2b9e9e6

Browse files
authored
Document Driver.verify_connectivity + add experimental notes (#667)
1 parent cd8d99c commit 2b9e9e6

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docs/source/api.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,13 @@ This object holds the details required to establish connections with a Neo4j dat
143143
:class:`neo4j.Driver` objects hold a connection pool from which :class:`neo4j.Session` objects can borrow connections.
144144
Closing a driver will immediately shut down all connections in the pool.
145145

146+
.. note::
147+
Driver objects only open connections and pool them as needed. To verify that
148+
the driver is able to communicate with the database without executing any
149+
query, use :meth:`neo4j.Driver.verify_connectivity`.
150+
146151
.. autoclass:: neo4j.Driver()
147-
:members: session, close
152+
:members: session, close, verify_connectivity
148153

149154

150155
.. _driver-configuration-ref:

neo4j/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,24 @@ def verify_connectivity(self, **config):
319319
Use the exception to further understand the cause of the connectivity problem.
320320
321321
Note: Even if this method throws an exception, the driver still need to be closed via close() to free up all resources.
322+
323+
.. note::
324+
\\*\\*config is experimental may change in the future.
325+
322326
"""
323327
raise NotImplementedError
324328

325-
@experimental("Feature support query, based on Bolt Protocol Version and Neo4j Server Version will change in the future.")
329+
@experimental("Feature support query, based on Bolt protocol version and Neo4j server version will change in the future.")
326330
def supports_multi_db(self):
327331
""" Check if the server or cluster supports multi-databases.
328332
329333
:return: Returns true if the server or cluster the driver connects to supports multi-databases, otherwise false.
330334
:rtype: bool
335+
336+
337+
.. note::
338+
Feature support query, based on Bolt Protocol Version and Neo4j
339+
server version will change in the future.
331340
"""
332341
with self.session() as session:
333342
session._connect(READ_ACCESS)

0 commit comments

Comments
 (0)