gobj_list_instances()

gobj_list_instances()#

Retrieves a list of instances for a given topic in a tree database. The function allows filtering and additional options to refine the query.

Prototype

json_t *gobj_list_instances(
    hgobj gobj,
    const char *topic_name,
    const char *pkey2_field,
    json_t *jn_filter,
    json_t *jn_options,
    hgobj src
);

Parameters

Key

Type

Description

gobj

hgobj

The GObj handler representing the tree database.

topic_name

const char *

The name of the topic whose instances are to be listed.

pkey2_field

const char *

The secondary key field used for filtering instances.

jn_filter

json_t *

A JSON object containing filter criteria for selecting instances.

jn_options

json_t *

A JSON object specifying additional options such as foreign key and hook options.

src

hgobj

The source GObj initiating the request.


Return Value

Returns a JSON object containing the list of instances matching the specified criteria. The caller must free the returned JSON object.

Notes

If the GObj is destroyed or the method is not implemented, the function logs an error and returns NULL.

Prototype

// Not applicable in JS

Prototype

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