Neo4j::Bolt::Node - Representation of a Neo4j Node
$q = 'MATCH (n) RETURN n'; $node = ( $cxn->run_query($q)->fetch_next )[0]; $node_id = $node->{id}; $labels = $node->{labels} // []; @labels = @$labels; $properties = $node->{properties} // {}; %properties = %$properties; $value1 = $node->{properties}->{property1}; $value2 = $node->{properties}->{property2}; $hashref = $node->as_simple;
Neo4j::Bolt::Node instances are created by executing a Cypher query that returns nodes from a Neo4j database. Their properties and metadata can be accessed as shown in the synopsis above.
If a query returns the same node twice, two separate Neo4j::Bolt::Node instances will be created.
$simple = $node->as_simple; $node_id = $simple->{_node}; @labels = @{ $simple->{_labels} }; $value1 = $simple->{property1}; $value2 = $simple->{property2};
Get node as a simple hashref in the style of REST::Neo4p.
The value of properties named _node or _labels will be replaced with the node's metadata.
_node
_labels
Neo4j::Bolt
Mark A. Jensen CPAN: MAJENSEN majensen -at- cpan -dot- org
This software is Copyright (c) 2019-2020 by Mark A. Jensen.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Neo4j::Bolt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Neo4j::Bolt
CPAN shell
perl -MCPAN -e shell install Neo4j::Bolt
For more information on module installation, please visit the detailed CPAN module installation guide.