treedb_node_jtree()#
treedb_node_jtree() constructs a hierarchical tree representation of child nodes linked through a specified hook.
Prototype
json_t *treedb_node_jtree(
json_t *tranger,
const char *hook,
const char *rename_hook,
json_t *node,
json_t *jn_filter,
json_t *jn_options
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the tranger database instance. |
|
|
Hook name used to establish parent-child relationships. |
|
|
Optional new name for the hook in the resulting tree. |
|
|
Pointer to the parent node from which the tree is built. Not owned. |
|
|
Filter criteria for selecting child nodes. Not owned. |
|
|
Options for controlling the structure of the resulting tree, including fkey and hook options. |
Return Value
A JSON object representing the hierarchical tree of child nodes. The caller must decrement the reference count when done.
Notes
The function recursively traverses child nodes using the specified hook. The rename_hook parameter allows renaming the hook in the output tree.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples