treedb_node_childs()
#
treedb_node_childs()
returns a list of child nodes linked to a given node through a specified hook, optionally applying filters and recursive traversal.
Prototype
json_t *treedb_node_childs(
json_t *tranger,
const char *hook,
json_t *node, // NOT owned, pure node
json_t *jn_filter, // filter to childs tree
json_t *jn_options // fkey,hook options, "recursive"
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the tranger database instance. |
|
|
The hook name used to retrieve child nodes. |
|
|
The parent node from which child nodes are retrieved. This parameter is not owned. |
|
|
Optional filter criteria to apply to the child nodes. This parameter is owned. |
|
|
Options for controlling the retrieval, including fkey and hook options, and whether to perform recursive traversal. |
Return Value
Returns a JSON array containing the child nodes that match the specified criteria. The caller must decrement the reference count when done.
Notes
If the recursive
option is enabled in jn_options
, treedb_node_childs()
will traverse the hierarchy recursively.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples