【发布时间】:2013-02-14 03:24:16
【问题描述】:
sqlite3_get_table 定义如下:
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 */
);
正如它在文档中所说,它可以方便地获得结果表,并且实现为 sqlite3_exec() 的包装器。
但现在不推荐了:
这是为向后兼容而保留的旧接口。不推荐使用此接口。
但是如果我使用sqlite3_exec,我需要编写一个额外的回调函数。比较复杂。
所以我的问题是这个界面的主要问题是什么?为什么需要弃用它?
欲了解更多信息,请参阅http://www.sqlite.org/c3ref/free_table.html。
【问题讨论】: