java.lang.Object
org.postgresql.pljava.internal.PgSavepoint
- All Implemented Interfaces:
Savepoint
Implementation of
Savepoint
for the SPI connection.
It is an historical oddity that this is in the .internal
package
rather than .jdbc
.
- Author:
- Thomas Hallgren
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
hashCode()
void
onInvocationExit
(boolean withError) void
release()
Release (commit) a savepoint; only to be called byConnection.releaseSavepoint
.void
rollback()
Roll back a savepoint; only to be called byConnection.rollback
.static PgSavepoint
Establish a savepoint; only to be called byConnection.setSavepoint
, which makes the arrangements foronInvocationExit
to be called.
-
Method Details
-
set
Establish a savepoint; only to be called byConnection.setSavepoint
, which makes the arrangements foronInvocationExit
to be called.- Throws:
SQLException
-
hashCode
public int hashCode() -
equals
-
release
Release (commit) a savepoint; only to be called byConnection.releaseSavepoint
.- Throws:
SQLException
-
rollback
Roll back a savepoint; only to be called byConnection.rollback
.JDBC's rollback-to-savepoint operation discards all more-deeply-nested savepoints, but not the one that is the target of the rollback. That one remains active and can be used again. That behavior matches PostgreSQL's SQL-level savepoints, but here it has to be built on top of the "internal subtransaction" layer, and made to work the right way.
- Throws:
SQLException
-
getSavepointName
- Specified by:
getSavepointName
in interfaceSavepoint
- Throws:
SQLException
-
getSavepointId
public int getSavepointId()- Specified by:
getSavepointId
in interfaceSavepoint
-
onInvocationExit
- Throws:
SQLException
-