treedb_delete_instance()
#
treedb_delete_instance()
deletes a specific instance of a node in the TreeDB, identified by its primary and secondary keys. If links exist and the force
option is not set, the deletion will fail.
Prototype
int treedb_delete_instance(
json_t *tranger,
json_t *node, // owned, pure node
const char *pkey2_name,
json_t *jn_options // bool "force"
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the tranger database instance. |
|
|
Owned JSON object representing the node to be deleted. |
|
|
Name of the secondary key used to identify the instance. |
|
|
JSON object containing options, including the |
Return Value
Returns 0
on success, or a negative error code if the deletion fails.
Notes
If links exist and force
is not set in jn_options
, treedb_delete_instance()
will fail.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples