Class SpannerConnection
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseConnection<SpannerDatabase>
-
- migratedb.core.internal.database.spanner.SpannerConnection
-
- All Implemented Interfaces:
AutoCloseable,Connection<SpannerDatabase>
public class SpannerConnection extends BaseConnection<SpannerDatabase>
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseConnection
database, jdbcTemplate, originalSchemaNameOrSearchPath
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpannerConnection(SpannerDatabase database, Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetCurrentSchemaNameOrSearchPath()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.-
Methods inherited from class migratedb.core.internal.database.base.BaseConnection
changeCurrentSchemaTo, close, doChangeCurrentSchemaOrSearchPathTo, doGetCurrentSchema, doRestoreOriginalState, getCurrentSchema, getJdbcConnection, getJdbcTemplate, restoreOriginalState
-
-
-
-
Constructor Detail
-
SpannerConnection
protected SpannerConnection(SpannerDatabase database, Connection connection)
-
-
Method Detail
-
getCurrentSchemaNameOrSearchPath
protected String getCurrentSchemaNameOrSearchPath()
- Specified by:
getCurrentSchemaNameOrSearchPathin classBaseConnection<SpannerDatabase>
-
getSchema
public Schema<?,?> getSchema(String name)
Description copied from interface:ConnectionRetrieves the schema with this name in the database.
-
lock
public <T> T lock(Table<?,?> table, Callable<T> callable)
Description copied from interface:ConnectionLocks this table and executes this callable.- Specified by:
lockin interfaceConnection<SpannerDatabase>- Overrides:
lockin classBaseConnection<SpannerDatabase>- Returns:
- The result of the callable.
-
-