Is there anything equivalent to Mysql’s "FOR UPDATE" in Sqlite?

Asked

Viewed 55 times

3

As the title itself says, there is something equivalent to FOR UPDATE Mysql in Sqlite?

Example:

SELECT id FROM minha_tabela WHERE id=1 FOR UPDATE

I own a query that uses a unique line lock within a transaction in Mysql and would like to know if there is an alternative that achieves the same effect using Sqlite.

1 answer

6


No, and there’s no point in it. Sqlite works with unique write transactions, so there can only be one write at a time and the entire database is locked for write operations on every write you want to do, And at the same time you don’t need any concern about the readings that take place without any special control, and that’s the beauty of the Sqlite. If there is no simultaneity there is no reason why there is this clause that is to deal with sharing problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.