sqlite3_get_table
is defined as below:
int sqlite3_get_table(
sqlite3 *db, /* An open database */
const char *zSql, /* SQL to be evaluated */
char ***pazResult, /* Results of the query */
int *pnRow, /* Number of result rows written here */
int *pnColumn, /* Number of result columns written here */
char **pzErrmsg /* Error msg written here */
);
As it said in the document, it can get a result table convenient and is implemented as a wrapper around sqlite3_exec().
But it is now not recommended:
This is a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended.
But if I use sqlite3_exec
, I need to write a extra callback function. It is more complex。</p>
So my question is what the main problem of this interface is? Why it need to be deprecated?
For more information see http://www.sqlite.org/c3ref/free_table.html.