[odb-users] ODB: Updating journal_mode

Boris Kolpackov boris at codesynthesis.com
Tue Jun 26 08:20:30 EDT 2018


Angadi, Manoj <Manoj.Angadi at arris.com> writes:

> Can you please share an example explaining how to update the journal_mode
> say from the default value of DELETE to OFF.

You can use the database::execute() function for that, for example:

db.execute ("PRAGMA schema.journal_mode = OFF");


> and query the value back.

To query it, you can use a native view (Chapter 10 in the manual).


> We have multiple linux processes accessing the same database file,
> should we be updating the journal_mode everytime we create a new
> odb::sqlite::database object within each of the processes?

I am not sure exactly what you are trying to achieve here. SQlite
generally does not allow concurrent access to the same database
from multiple processes. So the answer to this question depends
on how you manage this access.



More information about the odb-users mailing list