gpt4 book ai didi

c++ - 从 sqlite3_stmt* 检索 sqlite3*

转载 作者:搜寻专家 更新时间:2023-10-31 01:48:01 25 4
gpt4 key购买 nike

如果我有一个准备好的语句 - sqlite3_stmt*,有没有一种方法可以从中检索它准备好的 sqlite3* 数据库?

即一个看起来像这样的函数:

sqlite3* sqlite3_get_database_from_statement(sqlite3_stmt* statement);

最佳答案

好的,在标题中搜索了一下,找到了答案,这就是我要找的功能:

/*
** CAPI3REF: Find The Database Handle Of A Prepared Statement
**
** ^The sqlite3_db_handle interface returns the [database connection] handle
** to which a [prepared statement] belongs. ^The [database connection]
** returned by sqlite3_db_handle is the same [database connection]
** that was the first argument
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
** create the statement in the first place.
*/
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);

关于c++ - 从 sqlite3_stmt* 检索 sqlite3*,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18480516/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com