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 |
---|---|---|
|
|
A reference to the TimeRanger database instance. |
|
|
The name of the topic to which the record belongs. |
|
|
The record to update with volatile values. This parameter is not owned by the function. |
|
|
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