REST::Neo4p::Constraint::RelationshipType - Neo4j Relationship Type Constraints
# use REST::Neo4p::Constrain, it's nicer $rtc = REST::Neo4p::Constraint::RelationshipType->new( 'allowed_reln_types' => { _condition => 'only', _type_list => [qw(contains has)] } );
REST::Neo4p::Constraint::RelationshipType is a class that represent the set of relationship types that Relationships must (or must not) use.
REST::Neo4p::Constraint::RelationshipType
Constraint hash specification:
{ _condition => <'only'|'none'>, _priority => <integer priority>, _type_list => [ 'type_name_1', 'type_name_2', ...] } }
$rt = REST::Neo4p::Constraint::RelationshipType->new( $tag => $constraint_hash );
$rc->add_constraint('new_type'); $rc->add_type('new_type');
$rc->remove_constraint('old_type'); $rc->remove_type('old_type');
Returns the constraint tag.
Returns the constraint type ('relationship_type').
Get/set 'only' or 'none' for a given relationship constraint. See REST::Neo4p::Constrain.
Constraints with higher priority will be checked before constraints with lower priority by validate_relationship_type().
validate_relationship_type()
Returns the internal constraint spec hashref.
$c->validate( 'avoids' );
Returns true if the item meets the constraint, false if not.
REST::Neo4p, REST::Neo4p::Node, REST::Neo4p::Relationship, REST::Neo4p::Constraint, REST::Neo4p::Constraint::Relationship, REST::Neo4p::Constraint::RelationshipType.
Mark A. Jensen CPAN ID: MAJENSEN majensen -at- cpan -dot- org
Copyright (c) 2012 Mark A. Jensen. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install REST::Neo4p, copy and paste the appropriate command in to your terminal.
cpanm
cpanm REST::Neo4p
CPAN shell
perl -MCPAN -e shell install REST::Neo4p
For more information on module installation, please visit the detailed CPAN module installation guide.