GraphDatabaseDriver Method (Uri, ActionConfigBuilder) |
Returns a driver for a Neo4j instance with custom configuration.
Namespace:
Neo4j.Driver
Assembly:
Neo4j.Driver (in Neo4j.Driver.dll) Version: 4.2.0
Syntaxpublic static IDriver Driver(
Uri uri,
Action<ConfigBuilder> action
)
Public Shared Function Driver (
uri As Uri,
action As Action(Of ConfigBuilder)
) As IDriver
public:
static IDriver^ Driver(
Uri^ uri,
Action<ConfigBuilder^>^ action
)
static member Driver :
uri : Uri *
action : Action<ConfigBuilder> -> IDriver
Parameters
- uri
- Type: SystemUri
The URI to the Neo4j instance. Should be in the form
protocol://<server location>:<port>.
If port is not supplied the default of 7687 will
be used.
The supported protocols in URI could either be bolt or neo4j.
The protocol bolt should be used when creating a driver connecting to the Neo4j instance directly.
The protocol neo4j should be used when creating a driver with built-in routing.
- action
- Type: SystemActionConfigBuilder
Specifies how to build a driver configuration Config, using ConfigBuilder.
If set to null, then no modification will be carried out
and the default driver configurations Config will be used when creating the driver.
Return Value
Type:
IDriverA new
IDriver instance specified by the
uri.
ExceptionsException | Condition |
---|
ArgumentNullException | Thrown if uri is null. |
RemarksEnsure you provide the protocol for the uri.
See Also