redisgraph v0.1.0 RedisGraph.Node View Source
A Node member of a Graph.
Nodes have an alias which uniquely identifies them in a Graph. Nodes must have an alias in order for their associated Graph to be committed to the database.
Nodes have a label which is analogous to a type definition. Nodes can
be queried based on their label, e.g. person
or place
or food
.
Nodes may optionally have properties, a map of values associated with the entity. These properties can be returned by database queries.
Nodes may have aliases. When adding a RedisGraph.Node
to a
RedisGraph.Graph
, a random alias may be set on the Node prior
to being added to the Graph if it does not already have one.
Nodes which are created as the result of a MATCH
query in a
RedisGraph.QueryResult
will also have numeric ids which are
internal to the graph in the database.
Link to this section Summary
Functions
Compare two Nodes with respect to equality.
Creates a new Node.
Converts the properties to a query-appropriate string.
Sets the node's alias if it is nil
.
Converts the node to a query-appropriate string.
Link to this section Types
Link to this section Functions
Compare two Nodes with respect to equality.
Comparison logic:
- if ids differ then returns
false
- if aliases differ then returns
false
- if labels differ then returns
false
- if properties differ then returns
false
- otherwise returns
true
Creates a new Node.
Example
john = Node.new(%{
label: "person",
properties: %{
name: "John Doe",
age: 33
}
})
Converts the properties to a query-appropriate string.
Sets the node's alias if it is nil
.
Converts the node to a query-appropriate string.