OK, I think I got it. Thank you both Igor and Simon for your kind answers!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 5 Oct 2011, at 6:40pm, Pero Mirko wrote:
> So in other words a pseudo function like this:
>
> BEGIN EXCLUSIVE
> if anyerror return
> INSERT INTO [table]
> if anyerror ROLLBACK
> INSERT INTO [table]
> if anyerror ROLLBACK
> UPDATE [table]
> if anyerror ROLLBACK
> UPDATE [table]
> if anyerror R
On 10/5/2011 1:40 PM, Pero Mirko wrote:
So in other words a pseudo function like this:
BEGIN EXCLUSIVE
if anyerror return
INSERT INTO [table]
if anyerror ROLLBACK
INSERT INTO [table]
if anyerror ROLLBACK
UPDATE [table]
if anyerror ROLLBACK
UPDATE [table]
if anyerror ROLLBACK
COMMIT
if anyerror R
So in other words a pseudo function like this:
BEGIN EXCLUSIVE
if anyerror return
INSERT INTO [table]
if anyerror ROLLBACK
INSERT INTO [table]
if anyerror ROLLBACK
UPDATE [table]
if anyerror ROLLBACK
UPDATE [table]
if anyerror ROLLBACK
COMMIT
if anyerror ROLLBACK
return
Would that guarantee ROLLB
On 5 Oct 2011, at 5:42pm, Pero Mirko wrote:
> Furthermore doing something like:
> BEGIN EXCLUSIVE
> INSERT OR ROLLBACK INTO table
> INSERT OR ROLLBACK INTO table
> INSERT OR ROLLBACK INTO table
> COMMIT
>
> also doesn't make sense - because if first insert is successful and second
> is not it wo
On 10/5/2011 12:42 PM, Pero Mirko wrote:
and then it fails - will the database insert / update / delete first 10 or
will it return to initial state before any inserts?
The default behavior is ABORT, which means the statement that caused the
error is rolled back, but the transaction stays
>
> >and then it fails - will the database insert / update / delete first 10 or
> >will it return to initial state before any inserts?
>
>The default behavior is ABORT, which means the statement that caused the
error is rolled back, but the transaction stays open with any prior changes
still in pl
On 10/3/2011 3:21 PM, Pero Mirko wrote:
If I do
BEGIN EXCLUSIVE
. insert / update / delete queries here
COMMIT
does it guarantee it will automatically rollback if the error occurs or do I
have to specify it manually?
http://sqlite.org/lang_conflict.html
What happens if I have 20 que
If I do
BEGIN EXCLUSIVE
insert / update / delete queries here
COMMIT
does it guarantee it will automatically rollback if the error occurs or do I
have to specify it manually?
What happens if I have 20 queries, 10 execute successfully (after COMMIT)
and then it fails - will the database
9 matches
Mail list logo