[sqlite] Proper way to abort
> >I have some queries that may take 5-15 seconds to complete. Sometimes >the situation changes shortly after starting the query where my >program does not need those results anymore and the program wants to >abort and begin a different query instead. > >My question is: What is the proper way to abort a query, or other >operation during execution that will not cause any issues? By issues I >mean files not being closed, or memory not being free'd and such >because the operation was aborted and did not have finish normall, but >I can continue normally after the abort.. Maybe http://www.sqlite.org/c3ref/interrupt.html
[sqlite] Proper way to abort
On Mon, Aug 24, 2015 at 6:22 PM, Scott Doctor wrote: > I have some queries that may take 5-15 seconds to complete. Sometimes the > situation changes shortly after starting the query where my program does not > need those results anymore and the program wants to abort and begin a > different query instead. > > My question is: What is the proper way to abort a query, or other operation > during execution that will not cause any issues? You can use the sqlite3_progress_handler function for this, as documented in "http://sqlite.org/c3ref/progress_handler.html;. -- Ambrus
[sqlite] Proper way to abort
Sheesh, how did I miss that. Guess I need new glasses. Thats exactly what I was looking for. Scott Doctor scott at scottdoctor.com -- On 8/24/2015 9:39 AM, Jean-Christophe Deschamps wrote: > >> >> I have some queries that may take 5-15 seconds to complete. >> Sometimes the situation changes shortly after starting the >> query where my program does not need those results anymore >> and the program wants to abort and begin a different query >> instead. >> >> My question is: What is the proper way to abort a query, or >> other operation during execution that will not cause any >> issues? By issues I mean files not being closed, or memory >> not being free'd and such because the operation was aborted >> and did not have finish normall, but I can continue normally >> after the abort.. > > Maybe http://www.sqlite.org/c3ref/interrupt.html > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > >
[sqlite] Proper way to abort
I have some queries that may take 5-15 seconds to complete. Sometimes the situation changes shortly after starting the query where my program does not need those results anymore and the program wants to abort and begin a different query instead. My question is: What is the proper way to abort a query, or other operation during execution that will not cause any issues? By issues I mean files not being closed, or memory not being free'd and such because the operation was aborted and did not have finish normall, but I can continue normally after the abort.. Scott Doctor scott at scottdoctor.com --