NAME
Neo4j::Driver::ServerInfo - Provides Neo4j server address and version
VERSION
version 0.35
SYNOPSIS
use Neo4j::Driver;
$session = Neo4j::Driver->new->basic_auth(...)->session;
$host_port = $session->server->address;
$version_string = $session->server->version;
say "Contacting $version_string at $host_port.";
DESCRIPTION
Provides some basic information of the server where the result is obtained from.
To obtain server info, call "server" in Neo4j::Driver::Session.
METHODS
Neo4j::Driver::ServerInfo implements the following methods.
address
$host_port = $session->server->address;
Returns the host name and port number of the server. Takes the form of an URL authority string (for example: localhost:7474
).
agent
$agent_string = $session->server->agent;
Returns the product name and version number. Takes the form of a server agent string (for example: Neo4j/3.5.17
).
protocol_version
$bolt_version = $session->server->protocol_version;
Returns the Bolt protocol version with which the remote server communicates. Takes the form of a string "$major.$minor"
where the major and minor version numbers both are integers.
When the HTTP protocol is used instead of Bolt, this method returns an undefined value.
If the Bolt protocol is used, but the version number is unknown, an empty string is returned. This situation shouldn't occur unless you use Neo4j::Bolt version 0.20 or older.
version
$agent_string = $session->server->version;
Alias for agent()
.
Use of version()
is discouraged since version 0.26. This method may be deprecated and removed in future.
SEE ALSO
Equivalent documentation for the official Neo4j drivers: ServerInfo (Java), IServerInfo (.NET), ServerInfo (Python)
AUTHOR
Arne Johannessen <ajnn@cpan.org>
If you contact me by email, please make sure you include the word "Perl" in your subject header to help beat the spam filters.
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016-2023 by Arne Johannessen.
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0 or (at your option) the same terms as the Perl 5 programming language system itself.