set_volatil_values()

set_volatil_values()#

The set_volatil_values() function assigns volatile values to a record in the TreeDB, ensuring that non-persistent fields are set using default values if not provided.

Prototype

int set_volatil_values(
    json_t  *tranger,
    const char *topic_name,
    json_t  *record,  // NOT owned
    json_t  *kw       // NOT owned
);

Parameters

Key

Type

Description

tranger

json_t *

A reference to the TimeRanger database instance.

topic_name

const char *

The name of the topic to which the record belongs.

record

json_t *

The record to update with volatile values. This parameter is not owned by the function.

kw

json_t *

A JSON object containing the values to be set. This parameter is not owned by the function.


Return Value

Returns 0 on success, or a negative error code if an issue occurs.

Notes

This function does not modify foreign key (fkey), hook, or persistent fields. It only updates non-persistent attributes.

Prototype

// Not applicable in JS

Prototype

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