ex_cypher v0.2.0 ExCypher.Relationship

Mounts Cypher syntax-compliant relationships between nodes.

Link to this section Summary

Functions

Builds associations between nodes and relationships

Builds Cypher relationship structure given a set of parameters

Link to this section Functions

Link to this function

assoc(atom, arg)

assoc(
  direction :: assoc_direction(),
  {from :: node_or_relationship(), to :: node_or_relationship()}
) :: String.t()

Builds associations between nodes and relationships

Builds Cypher relationship structure given a set of parameters

Usage:

  • Building a relationship with params: iex> rel(%{year: 1980}) "[{"year": 1980}]"

  • Building a named relationship: iex> rel(:r, %{year: 1980}) "[r {"year": 1980}]"

  • Building a labeled relationship: iex> rel([:Rel], %{year: 1980}) "[:Rel {"year": 1980}]"

Link to this function

rel(props)

rel(props :: map()) :: String.t()
Link to this function

rel(labels, props)

rel(labels :: list(), props :: map()) :: String.t()
Link to this function

rel(name, labels \\ [], props \\ %{})

rel(name :: String.t(), labels :: list(), props :: map()) :: String.t()