[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-20 Thread James K. Lowden
On Wed, 18 Mar 2015 21:15:20 + Simon Slavin wrote: > A transaction is ended when you issue the COMMIT command. A > transaction fails if any command which changes the database in it > fails due to violating the schema. If a transaction fails then all > commands in it are automatically

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-19 Thread Simon Slavin
On 19 Mar 2015, at 12:29am, Keith Medcalf wrote: > A statement may fail, however that does not affect other statements within > the transaction. You still have to end a transaction with either a commit > (to commit the changes made by statements WHICH DID NOT FAIL) or rollback to > discard

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-18 Thread Petite Abeille
> On Mar 18, 2015, at 9:51 PM, Jason Vas Dias > wrote: > > I don't see how anything like that is possible in the sqlite3 shell . Not in the shell per se, no (.bail on|off may or may not help in your case). Perhaps ON CONFLICT clause might help you: https://www.sqlite.org/lang_conflict.html

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-18 Thread Simon Slavin
On 18 Mar 2015, at 8:51pm, Jason Vas Dias wrote: > 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

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-18 Thread Jason Vas Dias
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

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-18 Thread Keith Medcalf
>A transaction is ended when you issue the COMMIT command. A transaction >fails if any command which changes the database in it fails due to >violating the schema. If a transaction fails then all commands in it are >automatically ignored. There's no need to use ROLLBACK. You correctly >grouped