开发者

Android Sqlite query Execution Break

开发者 https://www.devze.com 2023-03-06 20:07 出处:网络
I am using a DB for some searching.When the user starts typing I perform a search in the DB, executing the query inside an async task.I can cancel the async task, but the query once it has started exe

I am using a DB for some searching. When the user starts typing I perform a search in the DB, executing the query inside an async task. I can cancel the async task, but the query once it has started executing, wont stop, so my searches becomes slow. It should executing the queries one at a time.

I need to cancel the current execution and start the search with a new search 开发者_JAVA百科string. How can I break current execution of the query? I have read SQL interrupt, but I don't understand how I can use it.


Unfortunately you can't. It's on native level. SQLite provides void sqlite3_interrupt(sqlite3*); in C interface.

0

精彩评论

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