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
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
> 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
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
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
>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
6 matches
Mail list logo