When the sqlite3 shell is used to run a long stream of commands , eg. from
a script file or input pipe from another process, how can the success / failure
status of the last statement be determined ?
IE. if the shell has just run an insert statment :
BEGIN TRANSACTION; INSERT INTO db VALUES(...); COMMIT;
how can the next statement determine if the previous statement failed ?
Or, can the insert statement transaction determine if it has failed or not, ie.
is it possible to do something like:
BEGIN TRANSACTION; INSERT INTO db VALUES(...);
ON SUCCESS: COMMIT;
ON FAILURE: ROLLBACK;
I don't see how anything like that is possible in the sqlite3 shell .
Any ideas ?