On 1 Apr 2015, at 8:09pm, Gert Van Assche <gertva at gmail.com> wrote:

> But this is definitely not the right way to do it. If I understand the doc
> correctly, it should be an expression, but I don't see how I can do this...

You can trigger a bail by causing any SQL error.  For example, inserting a 
duplicate value in a column which is declared UNIQUE, maybe a primary key.  Or 
inserting a NULL value in a column defined as NOT NULL.  Or failing any other 
constraint check.  So you may be able to use CASE or a calculation to arrange 
that under the condition you're watching, one of these happens.

You may be able to check the value returned by sqlite3 as it exits to see 
whether it bailed or exited normally.

Simon.

Reply via email to