Lua API

Relationship

Relationship

A Relationship is returned from requests such as RelationshipGet, but can also be returned as a list from requests such as NodeGetRelationships, NodeGetRelationshipsForTypes, etc.

getId

Retrieve the id of the Relationship

Relationship.getId

Example:


rel = RelationshipGet(1027)
rel.getId
            

getTypeId

Retrieve the type id of the Relationship

Relationship.getTypeId

Example:


rel = RelationshipGet(1027)
rel.getTypeId
            

getType

Retrieve the type of the Relationship

Relationship.getType

Example:


rel = RelationshipGet(1027)
rel.getType
            

getStartingNodeId

Retrieve the Starting Node Id of the Relationship

Relationship.getStartingNodeId

Example:


rel = RelationshipGet(1027)
rel.getStartingNodeId
            

getEndingNodeId

Retrieve the Ending Node Id of the Relationship

Relationship.getEndingNodeId

Example:


rel = RelationshipGet(1027)
rel.getEndingNodeId
            

getProperties

Retrieve the properties of the Relationship

Relationship.getProperties

Example:


rel = RelationshipGet(1027)
rel.getProperties
            

getProperty

Retrieve a property of the Relationship

Relationship.getProperty

Example:


rel = RelationshipGet(1027)
rel.getProperty("name")