检查SQLite是否使用journal_mode = WAL或journal_mode = DELETE的函数 [英] function to check if SQLite is using journal_mode=WAL or journal_mode=DELETE

查看:704
本文介绍了检查SQLite是否使用journal_mode = WAL或journal_mode = DELETE的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找可以帮助我查看启用哪种日记模式的功能. 我也在这里 函数列表
具有检查数据库状态的功能 sqlite3_db_status(....)但状态参数没有用于检查日记记录模式的选项

有没有一种功能或任何方法可以查找sql​​ite db是使用WAL模式还是普通日记模式.. !!

I was looking for function which would help me to see which journaling mode is enabled.. I looked here too list of function
There was function to check database status sqlite3_db_status(....) but status parameter didn't have option for check journaling mode

Is there a function or any way to find if sqlite db is using WAL-mode or normal journaling mode ..!!

推荐答案

要查询连接的日志模式,请执行 PRAGMA journal_mode 并读取结果.

To query the journal mode of a connection, execute PRAGMA journal_mode and read the result.

这篇关于检查SQLite是否使用journal_mode = WAL或journal_mode = DELETE的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆