View Source Bolt.Sips.Router (Boltx v0.0.1)

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

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

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
@spec merge_connections_maps(any(), any(), any()) :: any()
Link to this function

parse_server_version(some_version)

View Source
@spec 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!
@spec start_link(Keyword.t()) :: :ignore | {:error, Keyword.t()} | {:ok, pid()}
Link to this function

terminate_connections(role, prefix \\ :default)

View Source