Reading Uncommitted Changes from SQLite Database

I wrote an application (using Qt in C ++) that inserts data into a SQLite database. Another application is reading data from the same database, but I noticed that it is not possible to read uncommitted data. Instead, I would like to read the data, even if it is not already committed.

Reading the SQLite documentation, I found pragma read_uncommitted, which, as I understand it, should be what I need. The problem is that even if I set to true, I cannot get non-fixed data.

I tried to launch my application, which performs the insertion process, and at the same time launched the sqlite3 client. I set the pragma to true and I am trying to count the records inside the table. What I get is always 0 (the database was empty before the start of the insertion process) until the whole process is complete, when I immediately receive all the data.

Am I doing something wrong? Doesn't this pragma suggest that the sqlite3 client behaves differently?

+3
source share
1 answer

: , , . read_uncommitted , , . : http://www.sqlite.org/sharedcache.html.

+4

All Articles