msg2db_append_message()

msg2db_append_message()#

msg2db_append_message() appends a new message to the specified topic in the given message database.

Prototype

json_t *msg2db_append_message(
    json_t      *tranger,
    const char  *msg2db_name,
    const char  *topic_name,
    json_t      *kw,        // owned
    const char  *options    // "permissive"
);

Parameters

Key

Type

Description

tranger

json_t *

A reference to the TimeRanger database instance.

msg2db_name

const char *

The name of the message database.

topic_name

const char *

The name of the topic to which the message will be appended.

kw

json_t *

A JSON object containing the message data. This parameter is owned and will be managed internally.

options

const char *

Optional flags for message insertion. The value “permissive” allows flexible insertion rules.


Return Value

A JSON object representing the appended message. The returned object is NOT owned by the caller.

Notes

The caller should not modify or free the returned JSON object. Ensure that msg2db_open_db() has been called before using msg2db_append_message().

Prototype

// Not applicable in JS

Prototype

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