Class RedshiftSession
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseSession
-
- migratedb.v1.core.internal.database.redshift.RedshiftSession
-
- All Implemented Interfaces:
AutoCloseable,Session
public class RedshiftSession extends BaseSession
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseSession
jdbcTemplate, originalSchemaNameOrSearchPath
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeCurrentSchemaTo(Schema schema)Sets the current schema, which is the default owner of new database objects.voiddoChangeCurrentSchemaOrSearchPathTo(String schema)SchemadoGetCurrentSchema()protected StringgetCurrentSchemaNameOrSearchPath()RedshiftDatabasegetDatabase()RedshiftSchemagetSchema(String name)Retrieves the schema with this name in the database.-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseSession
close, doRestoreOriginalState, getCurrentSchema, getJdbcConnection, getJdbcTemplate, lock, restoreOriginalState
-
-
-
-
Method Detail
-
getCurrentSchemaNameOrSearchPath
protected String getCurrentSchemaNameOrSearchPath() throws SQLException
- Specified by:
getCurrentSchemaNameOrSearchPathin classBaseSession- Throws:
SQLException- when the current schema name or search path could not be retrieved.
-
changeCurrentSchemaTo
public void changeCurrentSchemaTo(Schema schema)
Description copied from interface:SessionSets the current schema, which is the default owner of new database objects. In many databases, the current schema is also used to lookup tables whenever the schema qualifier is omitted.- Specified by:
changeCurrentSchemaToin interfaceSession- Overrides:
changeCurrentSchemaToin classBaseSession
-
doChangeCurrentSchemaOrSearchPathTo
public void doChangeCurrentSchemaOrSearchPathTo(String schema) throws SQLException
- Overrides:
doChangeCurrentSchemaOrSearchPathToin classBaseSession- Parameters:
schema- The new current schema for this connection.- Throws:
SQLException- when the current schema could not be set.
-
doGetCurrentSchema
public Schema doGetCurrentSchema() throws SQLException
- Overrides:
doGetCurrentSchemain classBaseSession- Throws:
SQLException
-
getSchema
public RedshiftSchema getSchema(String name)
Description copied from interface:SessionRetrieves the schema with this name in the database.
-
getDatabase
public RedshiftDatabase getDatabase()
- Overrides:
getDatabasein classBaseSession
-
-