>To be clear, is it sqlite3_step returning SQLITE_DONE that marks it
>as "not running", or calling sqlite3_reset/sqlite3_finalize?

Well, "running" means that execution has commenced (the first call to 
sqlite3_step has been made on the statement) and the execution has not yet 
completed.  Execution has completed when either (a) sqlite3_step returns 
SQLITE_DONE or SQLITE_INTERRUPT or (b) you "reset" the program by calling 
sqlite3_reset on the statement.

In other words the flow is like this:

START:
  set RUNNING to 1
LOOP:
  do stuff
  yield a row by returning SQLITE_ROW
CARRYON:
  done?  no -> LOOP
END:
  set RUNNING to 0
  say we are done by returning SQLITE_DONE

>Also, is there any way to mark a statement as "running" other than
>calling sqlite_step on it? Otherwise, it sounds like I'll have to wait until
>after sqlite3_step gets called the first time to spawn the thread.

What are you trying to accomplish?  Perhaps what you really want is a progress 
callback?

https://sqlite.org/c3ref/progress_handler.html

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to