Lua API

Link

Link

Links are returned from Traversal requests starting with NodeGetRelationshipsIds

getNodeId

Retrieve the node id of the Link

Number Link:getNodeId()

Example:


names = {}
ids = NodeGetRelationshipsIds("Node", "Max")
for k=1,#ids do
    v = ids[k]
    table.insert(names, NodePropertyGetById(v:getNodeId(), "name"))
end
names
            

getRelationshipId

Retrieve the relationship id of the Link

Number Link:getRelationshipId()

Example:


weights = {}
ids = NodeGetRelationshipsIds("Node", "Max")
for k=1,#ids do
    v = ids[k]
    table.insert(names, RelationshipPropertyGetById(v:getRelationshipId(), "weight"))
end
weights