Re: Savepoints

David E. Wheeler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Sep 29, 2009, at 12:34 PM, David E. Wheeler wrote:

> Compared to transactions, the statements look like this:
>
>  TRANSACTIONS  | SAVEPOINTS
> -------------------------------------
>  BEGIN;        | SAVEPOINT :name;
>  COMMIT;       | RELEASE :name;
>  ROLLBACK;     | ROLLBACK TO :name;

Apologies, I made a mistake. It should actually be:

  TRANSACTIONS  | SAVEPOINTS
-------------------------------------
  BEGIN;        | SAVEPOINT :name;
  COMMIT;       | RELEASE SAVEPOINT :name;
  ROLLBACK;     | ROLLBACK TO SAVEPOINT :name;

I still think that methods named savepoint(), release(), and  
rollback_to() are ideal, but I could also see an argument that the  
latter two be named release_savepoint() and rollback_to_savepoint(),  
though they're a bit long.

Best,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.