开发者

SQLite: select for update wait 10 compatibility

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 witho开发者_JAVA百科ut having to manually edit the SQL statements.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜