NAME

Neo4j::Driver::ServerInfo - Provides Neo4j server address and version

VERSION

version 1.02

SYNOPSIS

$server_info = $session->server;
$server_info = $result_summary->server;

$host_port     = $server_info->address;
$neo4j_version = $server_info->agent;
$bolt_version  = $server_info->protocol_version;

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).

Before driver version 0.26, the agent string was retrieved with the version() method. That method has since been deprecated, matching a corresponding change in Neo4j 4.3.

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.

SEE ALSO

AUTHOR

Arne Johannessen (AJNN)

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016-2024 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.