gobj_get_node()

gobj_get_node()#

Retrieves a node from a tree database in the given hgobj instance. The node is identified by its topic name and a set of key-value filters.

Prototype

json_t *gobj_get_node(
    hgobj gobj,
    const char *topic_name,
    json_t *kw,
    json_t *jn_options,
    hgobj src
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance representing the tree database.

topic_name

const char *

The name of the topic in the tree database.

kw

json_t *

A JSON object containing key-value filters to identify the node. This parameter is owned and will be decremented.

jn_options

json_t *

A JSON object specifying additional options such as foreign key and hook options. This parameter is owned and will be decremented.

src

hgobj

The source hgobj instance requesting the node.


Return Value

Returns a JSON object representing the requested node. If the node is not found or an error occurs, NULL is returned.

Notes

This function requires the mt_get_node method to be implemented in the hgobj’s gclass. If the method is not defined, an error is logged.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples