treedb_delete_node()
#
The treedb_delete_node()
function deletes a node from the tree database. If the node has existing links, the deletion will fail unless the ‘force’ option is enabled.
Prototype
int treedb_delete_node(
json_t *tranger,
json_t *node, // owned, pure node
json_t *jn_options // bool "force"
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A reference to the tranger database instance. |
|
|
The node to be deleted. This parameter is owned and must be a pure node. |
|
|
A JSON object containing options for deletion. The ‘force’ boolean option determines whether to forcibly delete linked nodes. |
Return Value
Returns 0 on success, or a negative error code if the deletion fails.
Notes
If the node has existing links and ‘force’ is not enabled, treedb_delete_node()
will fail.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples