Posted on 2007-08-01
I know that SQLite locks the database exclusively when a write is performed on it. But is there any way of forcing a lock on it? For example I want to select some rows, then update those rows. My concern is that in between the time the rows are selected and when I update the rows that something will get written to the database and make my updates inaccurate.
I would love to have a stored procedure to do this to make it all easy but SQLite does not provide that. So is there any way of forcing a lock on the database BEFORE I do the select and then unlock it AFTER the update?
In perl :)