sqlite3_result_*

void sqlite3_result_blob(
    sqlite3_context*, const void*, int n, void(*)(void*));

void sqlite3_result_double(
    sqlite3_context*, double);

void sqlite3_result_error(
    sqlite3_context*, const char*, int);

void sqlite3_result_error16(
    sqlite3_context*, const void*, int);

void sqlite3_result_int(
    sqlite3_context*, int);

void sqlite3_result_int64(
    sqlite3_context*, long long int);

void sqlite3_result_null(
    sqlite3_context*);

void sqlite3_result_text(
    sqlite3_context*, const char*, int n, void(*)(void*));

void sqlite3_result_text16(
    sqlite3_context*, const void*, int n, void(*)(void*));

void sqlite3_result_text16be(
    sqlite3_context*, const void*, int n, void(*)(void*));

void sqlite3_result_text16le(
    sqlite3_context*, const void*, int n, void(*)(void*));

void sqlite3_result_value(
    sqlite3_context*, sqlite3_value*);

User-defined functions invoke these routines in order to set their return value. The sqlite3_result_value() routine returns an exact copy of one of the arguments to the function.

Your user-defined function should pass as the first argument the sqlite3_context* that was passed to it by QDB.