Property functions¶
-
get_inherited_properties(cur, node)¶ Get the entire inherited property dictionary.
To calculate this, the trees path from root node till
nodewill be traversed. For each level, the property dictionary will be merged into the previous one. This is a simple merge, only the first level of keys will be combined.Parameters: node (Node or int) – Return type: dict
-
get_inherited_property_value(cur, node, key)¶ Get the inherited value for a single property key.
Parameters: - node (Node or int) –
- key – str
-
get_nodes_by_property_dict(cur, query)¶ Return an iterator that yields a
NodeDataobject of every node which contains all key/value pairs ofqueryin its property dictionary. Inherited keys are not considered.Parameters: query (dict) – The dictionary to search for
-
get_nodes_by_property_key(cur, key)¶ Return an iterator that yields a
NodeDataobject of every node which containskeyin its property dictionary. Inherited keys are not considered.Parameters: key (str) – The key to search for
-
get_nodes_by_property_value(cur, key, value)¶ Return an iterator that yields a
NodeDataobject of every node which haskeyexactly set tovaluein its property dictionary. Inherited keys are not considered.Parameters: - key (str) – The key to search for
- value (object) – The exact value to sarch for
-
set_properties(cur, node, new_properties)¶ Set the property dictionary to
new_properties. ReturnNodeDataobject with updated properties.Parameters: - node (Node or int) –
- new_properties – dict
-
set_property_value(cur, node, key, value)¶ Set the value for a single property key. Return
NodeDataobject with updated properties.Parameters: - node (Node or int) –
- key – str
- value – object
-
update_properties(cur, node, new_properties)¶ Update existing property dictionary with another dictionary. Return
NodeDataobject with updated properties.Parameters: - node (Node or int) –
- new_properties – dict