Class DB2Schema
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseSchema<DB2Database,DB2Table>
-
- migratedb.core.internal.database.db2.DB2Schema
-
- All Implemented Interfaces:
Schema<DB2Database,DB2Table>
public class DB2Schema extends BaseSchema<DB2Database,DB2Table>
DB2 implementation of Schema.
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseSchema
database, jdbcTemplate, name
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Function<?,?>[]doAllFunctions()Retrieves all the functions in this schema.protected DB2Table[]doAllTables()Retrieves all the tables in this schema.protected voiddoClean()Cleans all the objects in this schema.protected voiddoCreate()Creates this schema in the database.protected voiddoDrop()Drops this schema from the database.protected booleandoEmpty()Checks whether this schema is empty.protected booleandoExists()Checks whether this schema exists.Function<?,?>getFunction(String functionName, String... args)Retrieves the function with this name in this schema.Table<?,?>getTable(String tableName)Retrieves the table with this name in this schema.protected Type<?,?>getType(String typeName)Retrieves the type with this name in this schema.
-
-
-
Method Detail
-
doExists
protected boolean doExists() throws SQLExceptionDescription copied from class:BaseSchemaChecks whether this schema exists.- Specified by:
doExistsin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the check failed.
-
doEmpty
protected boolean doEmpty() throws SQLExceptionDescription copied from class:BaseSchemaChecks whether this schema is empty.- Specified by:
doEmptyin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the check failed.
-
doCreate
protected void doCreate() throws SQLExceptionDescription copied from class:BaseSchemaCreates this schema in the database.- Specified by:
doCreatein classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the creation failed.
-
doDrop
protected void doDrop() throws SQLExceptionDescription copied from class:BaseSchemaDrops this schema from the database.- Specified by:
doDropin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the drop failed.
-
doClean
protected void doClean() throws SQLExceptionDescription copied from class:BaseSchemaCleans all the objects in this schema.- Specified by:
doCleanin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the clean failed.
-
doAllTables
protected DB2Table[] doAllTables() throws SQLException
Description copied from class:BaseSchemaRetrieves all the tables in this schema.- Specified by:
doAllTablesin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the retrieval failed.
-
doAllFunctions
protected Function<?,?>[] doAllFunctions() throws SQLException
Description copied from class:BaseSchemaRetrieves all the functions in this schema.- Overrides:
doAllFunctionsin classBaseSchema<DB2Database,DB2Table>- Throws:
SQLException- when the retrieval failed.
-
getTable
public Table<?,?> getTable(String tableName)
Description copied from interface:SchemaRetrieves the table with this name in this schema.
-
getType
protected Type<?,?> getType(String typeName)
Description copied from class:BaseSchemaRetrieves the type with this name in this schema.- Overrides:
getTypein classBaseSchema<DB2Database,DB2Table>
-
getFunction
public Function<?,?> getFunction(String functionName, String... args)
Description copied from interface:SchemaRetrieves the function with this name in this schema.- Specified by:
getFunctionin interfaceSchema<DB2Database,DB2Table>- Overrides:
getFunctionin classBaseSchema<DB2Database,DB2Table>
-
-