Savepoint Support
You can define savepoints in a transaction to separate groups of related statements.
The SAP HANA JDBC driver supports the following APIs defined by the JDBC specification to implement savepoint support:
| Class | Method |
|---|---|
| java.sql.Connection |
Savepoint setSavepoint() throws SQLException |
Savepoint setSavepoint( String <name> ) throws SQLException |
|
void rollback( Savepoint <savepoint> ) throws SQLException |
|
void releaseSavepoint( Savepoint <savepoint> ) throws SQLException |
|
| java.sql.DatabaseMetaData |
boolean supportsSavepoints() throws SQLException |
| java.sql.Savepoint |
int getSavepointId() throws SQLException |
String getSavepointName() throws SQLException |
The APIs are implemented by using the following SQL statements:
-
SAVEPOINT <savepoint_name>
-
RELEASE SAVEPOINT <savepoint_name>
-
ROLLBACK TO SAVEPOINT <savepoint_name>