On 4/19/2016 8:25 PM, Richard Hipp wrote:
> On 4/19/16, Nikolaos Tsikoudis <tsikudis at brandeis.edu> wrote:
>> Hi,
>>
>> I'm wondering if there is a way to stop the query I execute in a SQL
>> Function, the one you create by using the sqlite3_create_function
>> functions.I
>> have created a SQL function which is called for every tuple returned by my
>> queries and I would like the query to stop when a statement in the function
>> is satisfied, even if there are more tuple to be returned by the query.
>>
> https://www.sqlite.org/c3ref/interrupt.html
>
> Or have your function throw an error using sqlite3_result_error() -
> https://www.sqlite.org/c3ref/result_blob.html
>
That works but in the function I update another table in the same 
database and after the interrupt or the error throw the updates have not 
taken place. I guess the initial transaction rolls back and so does any 
other that started and completed in the function. Is there any way to 
keep the updated data even if the query is interrupted?

Thanks,
Nikos

Reply via email to