get_relationship_types()

Usage

get_relationship_types(node[, lookupType [, direction ]])

Parameters

  • node: The node for which possible relationship types should be checked
  • lookupType: Either existing (default) or schema
  • direction: Either incoming, outgoing or both (default)

Description

Returns the list of available relationship types form and/or to this node. Either potentially available (as defined in the schema) or actually available (existing relationships in the database).

Example

${get_relationship_types(me, 'schema')}
${get_relationship_types(me, 'schema', 'incoming')}
${get_relationship_types(me, 'schema', 'outgoing')}

${get_relationship_types(me, 'existing')}
${get_relationship_types(me, 'existing', 'incoming')}
${get_relationship_types(me, 'existing', 'outgoing')}

results in

[HOME_DIR, WORKING_DIR, OWNS, SECURITY, PICTURE_OF, FAVORITE, CONTAINS]
[OWNS, SECURITY, PICTURE_OF, CONTAINS]
[HOME_DIR, WORKING_DIR, OWNS, SECURITY, FAVORITE]

[OWNS, SECURITY, CONTAINS]    (user owns nodes, has permissions on nodes and is contained in a group)
[OWNS, SECURITY]              (user owns nodes and has permissions on nodes)
[CONTAINS]                    (user is contained in a group)
About this article
Last change 2019-03-12
Topics