Interface Connection<D extends Database<?>>
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
BaseConnection,BigQueryConnection,CockroachDBConnection,DB2Connection,DerbyConnection,FirebirdConnection,H2Connection,HSQLDBConnection,IgniteThinConnection,InformixConnection,MySQLConnection,OracleConnection,PostgreSQLConnection,RedshiftConnection,SAPHANAConnection,SnowflakeConnection,SpannerConnection,SQLiteConnection,SQLServerConnection,SybaseASEConnection,SynapseConnection,TiDBConnection,YugabyteDBConnection
public interface Connection<D extends Database<?>> extends AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeCurrentSchemaTo(Schema<?,?> schema)voidclose()Schema<?,?>getCurrentSchema()ConnectiongetJdbcConnection()JdbcTemplategetJdbcTemplate()Schema<?,?>getSchema(String name)Retrieves the schema with this name in the database.<T> Tlock(Table<?,?> table, Callable<T> callable)Locks this table and executes this callable.voidrestoreOriginalState()
-
-
-
Method Detail
-
getCurrentSchema
Schema<?,?> getCurrentSchema()
-
changeCurrentSchemaTo
void changeCurrentSchemaTo(Schema<?,?> schema)
-
lock
<T> T lock(Table<?,?> table, Callable<T> callable)
Locks this table and executes this callable.- Returns:
- The result of the callable.
-
getJdbcTemplate
JdbcTemplate getJdbcTemplate()
-
restoreOriginalState
void restoreOriginalState()
-
getJdbcConnection
Connection getJdbcConnection()
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
-