-
-
13 Jun 2022 21:56:15 UTC
- Distribution: Neo4j-Driver
- Module version: 0.31
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (370 / 1 / 1)
- Kwalitee
Bus factor: 2- 90.38% Coverage
- License: artistic_2
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (104.5KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Neo4j::Driver::Type::Relationship - Describes a relationship from a Neo4j graph
VERSION
version 0.31
SYNOPSIS
$q = "MATCH (a:Person)-[k:KNOWS]->(b:Person) RETURN k"; $rel = $driver->session->run($q)->list->[0]->get('k'); print 'Person # ', $rel->start_id; print ' ', $rel->type; print ' person # ', $rel->end_id; print ' since ', $rel->properties->{since};
DESCRIPTION
Describes a relationship from a Neo4j graph. A relationship may be a part of records returned from Cypher statement execution. Its description contains the relationship's properties as well as certain meta data, all accessible by methods that this class provides.
Neo4j::Driver::Type::Relationship objects are not in a one-to-one relation with relationships in a Neo4j graph. If the same Neo4j relationship is fetched multiple times, then multiple distinct Neo4j::Driver::Type::Relationship objects will be created by the driver. If your intention is to verify that two Neo4j::Driver::Type::Relationship objects in Perl describe the same node in the Neo4j database, you need to compare their IDs.
METHODS
Neo4j::Driver::Type::Relationship inherits all methods from Neo4j::Types::Relationship.
get
$value = $relationship->get('property_key');
See "get" in Neo4j::Types::Relationship.
id
$id = $relationship->id;
See "id" in Neo4j::Types::Relationship.
properties
$hashref = $relationship->properties; $value = $hashref->{property_key};
See "properties" in Neo4j::Types::Relationship.
start_id
$id = $relationship->start_id;
See "start_id" in Neo4j::Types::Relationship.
end_id
$id = $relationship->end_id;
See "end_id" in Neo4j::Types::Relationship.
type
$type = $relationship->type;
See "type" in Neo4j::Types::Relationship.
BUGS
The value of properties named
_meta
,_relationship
,_start
,_end
, or_type
may not be returned correctly.When using HTTP JSON, the
type
of relationships that are returned as part of a Neo4j::Driver::Type::Path is unavailable, because that information is not currently reported by the Neo4j server.undef
is returned instead.SEE ALSO
Equivalent documentation for the official Neo4j drivers: Relationship (Java), Relationship (Python)
AUTHOR
Arne Johannessen <ajnn@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016-2022 by Arne Johannessen.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Module Install Instructions
To install Neo4j::Driver, copy and paste the appropriate command in to your terminal.
cpanm Neo4j::Driver
perl -MCPAN -e shell install Neo4j::Driver
For more information on module installation, please visit the detailed CPAN module installation guide.