我想为journal_mode启用WAL模式。我使用的是类SqliteDatabase of 密码包。它没有enableWriteAheadLogging()方法。而不是这样,我试图通过事务启用模式。
但是有一个例外,"Caused by: net.sqlcipher.database.SQLiteException: cannot change into wal mode from within a transaction: PRAGMA journal_mode = WAL".,我没有任何变体来解决它。帮帮我求你了!
发布于 2018-09-20 10:51:58
在打开数据库时,我能够通过SQLiteDatabaseHook::postKey启用wal模式。在postKey()方法中需要执行database.rawExecSQL("PRAGMA journal_mode = WAL");命令。
https://stackoverflow.com/questions/52312594
复制相似问题