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

Number Relationship:getId()

Example:


rel = RelationshipGet(1027)
rel:getId()
            

getTypeId

Retrieve the type id of the Relationship

Number Relationship:getTypeId()

Example:


rel = RelationshipGet(1027)
rel:getTypeId()
            

getType

Retrieve the type of the Relationship

String Relationship:getType()

Example:


rel = RelationshipGet(1027)
rel:getType()
            

getStartingNodeId

Retrieve the Starting Node Id of the Relationship

Number Relationship:getStartingNodeId()

Example:


rel = RelationshipGet(1027)
rel:getStartingNodeId()
            

getEndingNodeId

Retrieve the Ending Node Id of the Relationship

Number Relationship:getEndingNodeId()

Example:


rel = RelationshipGet(1027)
rel:getEndingNodeId()
            

getProperties

Retrieve the properties of the Relationship

Table Relationship:getProperties()

Example:


rel = RelationshipGet(1027)
rel:getProperties()
            

getProperty

Retrieve a property of the Relationship

sol::object Relationship:getProperty(String)

Example:


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