views:

51

answers:

2

SQLite doesn't support nor accept such a query:

select * from mytable where col = 'val' for update wait 10;

Do you know if there is a way to make SQLite silently skipping the part "for update wait 10" and thus avoid any parsing error. My point is to get Oracle SQL commands barely working against SQLite without having to manually edit the SQL statements.

A: 

Hello.

I think you may have to edit SQLite source code, lemon parser.

There is no such builtin thing. You can though lock databases using

BEGIN [IMMEDIATE|EXCLUSIVE|DEFERRED] TRANSACTION

See this page for details

Benoit
A: 

You can't update the sqlite db when another thread or process is reading and you can't read while another thread or process is writing, so very different locking behavior than Oracle provides.

Sqlite locks the whole database, not just a record or a selection of records. I think you need to check a lot of queries.

TTT