I'm using an SQLite database as a substitute for a very large in-memory data structure, so I have a simple single-threaded process repeatedly reading from and writing to the database through a single database connection. (I'm using the SQLite C API directly from within a C++ application.) If I perform a write operation, can I later read that data back in without first performing a COMMIT operation? That is, would it work to execute "BEGIN TRANSACTION" when I open the file, do all of my data processing (interleaving reads and writes), then execute "COMMIT" just before closing the file?
I was hoping that OS-level file buffers would allow for this sort of behaviour (e.g., see "Are Unix reads and writes to a single file atomically serialized?"), or perhaps some sort of internal SQLite buffering would come into play, but couldn't find this addressed specifically anywhere.