9

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 ..!!

Sumit Murari
  • 1,597
  • 3
  • 28
  • 43

1 Answers1

9

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

CL.
  • 173,858
  • 17
  • 217
  • 259
  • If I have to read from a C++ program , how to read output of pragma as they may run on "sqlite3_prepare()" OR on step(). How should be my call like ?? Thank you for all those answers..>!! – Sumit Murari Feb 20 '14 at 15:35
  • You would read it like a `SELECT` query, i.e., `sqlite3_step` returns `SQLITE_ROW`, and you call `sqlite3_column_`*. – CL. Feb 20 '14 at 17:39