gpt4 book ai didi

java - SQLiteOpenHelper 查询 - 如何显示 SQL 语句

转载 作者:行者123 更新时间:2023-12-01 11:39:48 26 4
gpt4 key购买 nike

我想知道是否可以查看 SQLiteOpenHelper 生成的 SQL 语句。这是一些示例代码:

    String selection = "USER_LOGIN=?";
String[] sectionArgument = new String[]{"username"};
String[] columns = new String[]{"USER_LOGIN", "USER_PASS"};

Cursor c = mDatabase.query("ACCOUNT_TABLE", columns, selection, sectionArgument, null, null, null);

现在如何从 query-Method 中查看生成的 SQL 语句。

最佳答案

要查看向 SQLCipher 数据库发出的查询,请参阅 PRAGMA cipher_profile命令,它允许您捕获查询及其各自的执行时间(以毫秒为单位)。

关于java - SQLiteOpenHelper 查询 - 如何显示 SQL 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29628239/

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