Subject | commit to savepoint ?? |
---|---|
Author | peppe.polpo |
Post date | 2008-04-21T07:35:10Z |
I am aware of commands
save to savepoint xxx
rollback to savepoint xxx
release savepoint xxx [only]
I thought that savepoints could be a great way to implement an Undo
feature inside an application almost for free.
The undo feature requires the ability to cancel 1 or multiple back
operations, say up to a maximum value of N (where N is a constant).
However it seems that savepoints won't allow that unless I keep a
transaction open.
But it is no good to have a transaction open for a long time in a
multiuser environment.
I would like a command like
commit to savepoint xxx
But this command is not avaiable, or am I wrong ?
T0 T1 T2 T3
Say I open a transaction at time T0, then save to savepoints S1, S2,
S3 at times T1,T2,T3 .
Say I want my Undo list to have a maximum of 2 back operations.
For the economy of the database, it is time to commit the operations I
did at times T0 and time T1.
But it seems I cannot do that, I cannot _advance_ the transaction to
savepoint T2 (I have the choice btw committing all or nothing).
Correct ?
Thank you
Peppe Polpo
save to savepoint xxx
rollback to savepoint xxx
release savepoint xxx [only]
I thought that savepoints could be a great way to implement an Undo
feature inside an application almost for free.
The undo feature requires the ability to cancel 1 or multiple back
operations, say up to a maximum value of N (where N is a constant).
However it seems that savepoints won't allow that unless I keep a
transaction open.
But it is no good to have a transaction open for a long time in a
multiuser environment.
I would like a command like
commit to savepoint xxx
But this command is not avaiable, or am I wrong ?
T0 T1 T2 T3
Say I open a transaction at time T0, then save to savepoints S1, S2,
S3 at times T1,T2,T3 .
Say I want my Undo list to have a maximum of 2 back operations.
For the economy of the database, it is time to commit the operations I
did at times T0 and time T1.
But it seems I cannot do that, I cannot _advance_ the transaction to
savepoint T2 (I have the choice btw committing all or nothing).
Correct ?
Thank you
Peppe Polpo