【问题标题】:SQLiteOpenHelper Query - How to show the SQL-StatmentSQLiteOpenHelper 查询 - 如何显示 SQL 语句
【发布时间】:2015-04-14 13:10:26
【问题描述】:

我想知道是否可以查看 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 语句。

【问题讨论】:

    标签: java android sqliteopenhelper sqlcipher


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多