Class BaseConnection<D extends Database<?>>
java.lang.Object
migratedb.v1.core.internal.database.base.BaseConnection<D>
- All Implemented Interfaces:
AutoCloseable,Connection<D>
- Direct Known Subclasses:
BigQueryConnection,CockroachDBConnection,DB2Connection,DerbyConnection,FirebirdConnection,H2Connection,HSQLDBConnection,IgniteThinConnection,InformixConnection,MySQLConnection,OracleConnection,PostgreSQLConnection,RedshiftConnection,SAPHANAConnection,SnowflakeConnection,SpannerConnection,SQLiteConnection,SQLServerConnection,SybaseASEConnection
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeCurrentSchemaTo(Schema<?, ?> schema) final voidclose()protected voiddoChangeCurrentSchemaOrSearchPathTo(String schemaNameOrSearchPath) protected Schema<?,?> protected voidfinal Schema<?,?> protected abstract Stringfinal Connectionfinal JdbcTemplate<T> TLocks this table and executes this callable.final voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface migratedb.v1.core.api.internal.database.base.Connection
getSchema
-
Field Details
-
database
-
jdbcTemplate
-
originalSchemaNameOrSearchPath
-
-
Constructor Details
-
BaseConnection
-
-
Method Details
-
getCurrentSchemaNameOrSearchPath
- Throws:
SQLException- when the current schema name or search path could not be retrieved.
-
getCurrentSchema
- Specified by:
getCurrentSchemain interfaceConnection<D extends Database<?>>
-
doGetCurrentSchema
- Throws:
SQLException
-
changeCurrentSchemaTo
- Specified by:
changeCurrentSchemaToin interfaceConnection<D extends Database<?>>
-
doChangeCurrentSchemaOrSearchPathTo
protected void doChangeCurrentSchemaOrSearchPathTo(String schemaNameOrSearchPath) throws SQLException - Parameters:
schemaNameOrSearchPath- The new current schema for this connection.- Throws:
SQLException- when the current schema could not be set.
-
lock
Description copied from interface:ConnectionLocks this table and executes this callable.- Specified by:
lockin interfaceConnection<D extends Database<?>>- Returns:
- The result of the callable.
-
getJdbcTemplate
- Specified by:
getJdbcTemplatein interfaceConnection<D extends Database<?>>
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection<D extends Database<?>>
-
restoreOriginalState
public final void restoreOriginalState()- Specified by:
restoreOriginalStatein interfaceConnection<D extends Database<?>>
-
doRestoreOriginalState
- Throws:
SQLException
-
getJdbcConnection
- Specified by:
getJdbcConnectionin interfaceConnection<D extends Database<?>>
-