SQLite Forum

open db in read only; explicitly store diff as WAL ?
Login
@Keith:

I asked the original question.

I apologize for the confusion caused by my use of the phrase "read-only".

The question I meant to ask is:

Is it possible[1] to:

  1. open the __file__ old.db with "read-only" tag, as in https://www.cplusplus.com/reference/cstdio/fopen/ with "r"

  2. have changes to the db be written out to the writable WAL, with "old.db" unmodified

I hope this clears things up.

[1] I am a programmer myself, playing with trivial implementations of Relational DB's, so here "possible" includes "modifying the source code"