Bolt.Sips v2.0.11 Bolt.Sips.Router View Source

This "driver" works in tandem with Neo4j's Causal Clustering feature by directing read and write behaviour to appropriate cluster members

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

parse the version string received from the server, while considering the lack of the patch number in some situations

start a new (DB)Connection process, supervised registered under a name following this convention

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get_connection(role, prefix \\ :direct)

View Source
Link to this function

merge_connections_maps(current_connections, new_connections, prefix \\ :default)

View Source
merge_connections_maps(any(), any(), any()) :: any()
Link to this function

parse_server_version(some_version)

View Source
parse_server_version(map()) :: {binary(), <<_::16, _::_*8>>}

parse the version string received from the server, while considering the lack of the patch number in some situations

Examples

iex> Bolt.Sips.Router.parse_server_version(%{"server" => "Neo4j/3.5.0"}) {"Neo4j/3.5.0", "3.5.0"}

iex> Bolt.Sips.Router.parse_server_version(%{"server" => "Neo4j/3.5"}) {"Neo4j/3.5", "3.5.0"}

iex> Bolt.Sips.Router.parse_server_version(%{"server" => "Neo4j/3.5.10"}) {"Neo4j/3.5.10", "3.5.10"}

iex> Bolt.Sips.Router.parse_server_version(%{"server" => "Neo4j/3.5.11.1"}) {"Neo4j/3.5.11.1", "3.5.11"}

Link to this function

start_connections(opts, routing_table)

View Source

start a new (DB)Connection process, supervised registered under a name following this convention:

  • "role@hostname:port", the role, hostname and the port are collected from the user's configuration: opts. The role parameter is ignored when the routing_table parameter represents a neo4j map containing the definition for a neo4j cluster! It defaults to: :direct, when not specified!
Link to this function

start_link(init_args)

View Source
start_link(Keyword.t()) :: :ignore | {:error, Keyword.t()} | {:ok, pid()}
Link to this function

terminate_connections(role, prefix \\ :default)

View Source