[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    [sqlite] Nested transactions
From:       Igor Korot <ikorot01 () gmail ! com>
Date:       2013-11-23 8:41:29
Message-ID: CA+FnnTx4NZyouLYZg=QHR8-MRMD9vf4oGVAKQL_bHOnLNGiB0g () mail ! gmail ! com
[Download RAW message or body]

If I understand correctly, I can do this (pseudo-code):

BEGIN TRANSACTION;
// some SQL statements
BEGIN TRANSACTION;
// some more SQL statements
IF (more SQL statements == SUCCESS )
    COMMIT;
END
///// no need to ROLLBACK here, it will be done in the outer transaction
IF( SQL statements == SUCCESS )
    COMMIT;
ELSE
     ROLLBACK;
END;

This scenario will not end up with with unfinished transaction and I
don't have to use SAVEPOINT/RELEASE in this case.

Am I correct?

Thank you.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic