@ProviderType
public interface BaseDbService
BaseDbService
offers APIs to acquire and use a JDBC Connection to the embedded SQL database running in the
framework.
The configuration of the BaseDbService
will determine the configuration of the embedded SQL database.
The usage of API is typical for JDBC Connections; the connection is first acquired with getConnection(),
and it must be released when the operation is completed with close(). The implementation of the
DbService and the returned JdbcConnection will manage the concurrent access into the database appropriately.Modifier and Type | Method and Description |
---|---|
void |
close(java.sql.Connection conn)
Releases a previously acquired JDCB connection to the DbService.
|
void |
close(java.sql.ResultSet... rss)
Utility method to silently close a JDBC ResultSet without throwing SQLExcepton.
|
void |
close(java.sql.Statement... stmts)
Utility method to silently close a JDBC Statement without throwing SQLExcepton.
|
java.sql.Connection |
getConnection()
Returns the JDBC Connection to be used to communicate with the embedded SQL database.
|
void |
rollback(java.sql.Connection conn)
Utility method to silently rollback a JDBC Connection without throwing SQLExcepton.
|
java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
void close(java.sql.Connection conn)
conn
- to be releasedvoid rollback(java.sql.Connection conn)
void close(java.sql.ResultSet... rss)
void close(java.sql.Statement... stmts)