- java.lang.Object
-
- org.postgresql.pljava.internal.PgSavepoint
-
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
getSavepointId()
String
getSavepointName()
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
set(String name)
Establish a savepoint; only to be called byConnection.setSavepoint
, which makes the arrangements foronInvocationExit
to be called.
-
-
-
Method Detail
-
set
public static PgSavepoint set(String name) throws SQLException
Establish a savepoint; only to be called byConnection.setSavepoint
, which makes the arrangements foronInvocationExit
to be called.- Throws:
SQLException
-
release
public void release() throws SQLException
Release (commit) a savepoint; only to be called byConnection.releaseSavepoint
.- Throws:
SQLException
-
rollback
public void rollback() throws SQLException
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
public String getSavepointName() throws SQLException
- Specified by:
getSavepointName
in interfaceSavepoint
- Throws:
SQLException
-
getSavepointId
public int getSavepointId()
- Specified by:
getSavepointId
in interfaceSavepoint
-
onInvocationExit
public void onInvocationExit(boolean withError) throws SQLException
- Throws:
SQLException
-
-