Class CockroachDBSchema
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseSchema<CockroachDBDatabase,CockroachDBTable>
-
- migratedb.core.internal.database.cockroachdb.CockroachDBSchema
-
- All Implemented Interfaces:
Schema<CockroachDBDatabase,CockroachDBTable>
public class CockroachDBSchema extends BaseSchema<CockroachDBDatabase,CockroachDBTable>
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseSchema
database, jdbcTemplate, name
-
-
Constructor Summary
Constructors Constructor Description CockroachDBSchema(JdbcTemplate jdbcTemplate, CockroachDBDatabase database, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CockroachDBTable[]doAllTables()Retrieves all the tables in this schema.protected voiddoClean()Cleans all the objects in this schema.protected voiddoCleanOnce()protected voiddoCreate()Creates this schema in the database.protected voiddoCreateOnce()protected voiddoDrop()Drops this schema from the database.protected voiddoDropOnce()protected booleandoEmpty()Checks whether this schema is empty.protected booleandoExists()Checks whether this schema exists.Table<?,?>getTable(String tableName)Retrieves the table with this name in this schema.-
Methods inherited from class migratedb.core.internal.database.base.BaseSchema
allFunctions, allTables, allTypes, clean, create, doAllFunctions, drop, empty, equals, exists, getFunction, getName, getType, hashCode, toString
-
-
-
-
Constructor Detail
-
CockroachDBSchema
public CockroachDBSchema(JdbcTemplate jdbcTemplate, CockroachDBDatabase database, String name)
-
-
Method Detail
-
doExists
protected boolean doExists() throws SQLExceptionDescription copied from class:BaseSchemaChecks whether this schema exists.- Specified by:
doExistsin classBaseSchema<CockroachDBDatabase,CockroachDBTable>- 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<CockroachDBDatabase,CockroachDBTable>- 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<CockroachDBDatabase,CockroachDBTable>- Throws:
SQLException- when the creation failed.
-
doCreateOnce
protected void doCreateOnce() throws SQLException- Throws:
SQLException
-
doDrop
protected void doDrop() throws SQLExceptionDescription copied from class:BaseSchemaDrops this schema from the database.- Specified by:
doDropin classBaseSchema<CockroachDBDatabase,CockroachDBTable>- Throws:
SQLException- when the drop failed.
-
doDropOnce
protected void doDropOnce() throws SQLException- Throws:
SQLException
-
doClean
protected void doClean() throws SQLExceptionDescription copied from class:BaseSchemaCleans all the objects in this schema.- Specified by:
doCleanin classBaseSchema<CockroachDBDatabase,CockroachDBTable>- Throws:
SQLException- when the clean failed.
-
doCleanOnce
protected void doCleanOnce() throws SQLException- Throws:
SQLException
-
doAllTables
protected CockroachDBTable[] doAllTables() throws SQLException
Description copied from class:BaseSchemaRetrieves all the tables in this schema.- Specified by:
doAllTablesin classBaseSchema<CockroachDBDatabase,CockroachDBTable>- Throws:
SQLException- when the retrieval failed.
-
-