completion of sqlite3_exec

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

completion of sqlite3_exec

Eno Thereska
Hi,

Is there a way to know if a row returned through the callback to
sqlite3_exec is the "last" row that will be sent (i.e. the query has
finished completely)? I ask because I have per-query data structures
that I need to free once I know a query has completed.

I was expecting the callback function to have a flag too (e.g.
QUERY_COMPLETED) to tell me this, but it doesn't. Is there a solution?

Thanks
Eno

Reply | Threaded
Open this post in threaded view
|

Re: completion of sqlite3_exec

Dennis Cote
Eno Thereska wrote:

> Is there a way to know if a row returned through the callback to
> sqlite3_exec is the "last" row that will be sent (i.e. the query has
> finished completely)? I ask because I have per-query data structures
> that I need to free once I know a query has completed.
>
Eno,

Your call to sqlite3_exec() will return only after the the query is
completely finished. Can't you free your data structures then?

HTH
Dennis Cote