void sqlite3_result_str(sqlite3_context*, sqlite3_str*, int);
The sqlite3_result_str(C,S,F) interface causes the dynamic string S to become the return value for the application-defined function or virtual table that uses sqlite3_context C. The F flag can be one of SQLITE_COPY or SQLITE_XFER or SQLITE_FINISH.
If the dynamic string is invalid or incomplete due to an out-of-memory or string-too-large error, then this routine transfers that error over to the SQL function.
If the F argument is SQLITE_COPY, then a copy of the dynamic string content is made and the dynamic string object is unchanged. If the F argument is SQLITE_XFER, then ownership of the content in the dynamic is transferred to the SQL function (via a pointer copy rather than a string copy) and the dynamic string is reset to an empty string. The SQLITE_FINISH value for F works like SQLITE_RESET except that it also invokes the sqlite3_str_free(S) destructor on the dynamic string object.
See also lists of Objects, Constants, and Functions.
*** DRAFT ***