java.lang.Object
migratedb.v1.core.internal.database.base.BaseSchema<D,T>
- All Implemented Interfaces:
Schema<D,T>
- Direct Known Subclasses:
BigQuerySchema,CockroachDBSchema,DB2Schema,DerbySchema,FirebirdSchema,H2Schema,HSQLDBSchema,IgniteThinSchema,InformixSchema,MySQLSchema,OracleSchema,PostgreSQLSchema,RedshiftSchema,SAPHANASchema,SnowflakeSchema,SpannerSchema,SQLiteSchema,SQLServerSchema,SybaseASESchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Dprotected final JdbcTemplateprotected final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final Function<?,?>[] Retrieves all the functions in this schema.T[]Retrieves all the tables in this schema.protected final Type<?,?>[] allTypes()Retrieves all the types in this schema.voidclean()Cleans all the objects in this schema.voidcreate()Creates this schema in the database.protected Function<?,?>[] Retrieves all the functions in this schema.protected abstract T[]Retrieves all the tables in this schema.protected abstract voiddoClean()Cleans all the objects in this schema.protected abstract voiddoCreate()Creates this schema in the database.protected abstract voiddoDrop()Drops this schema from the database.protected abstract booleandoEmpty()Checks whether this schema is empty.protected abstract booleandoExists()Checks whether this schema exists.voiddrop()Drops this schema from the database.booleanempty()booleanbooleanexists()Function<?,?> getFunction(String functionName, String... args) Retrieves the function with this name in this schema.getName()protected Type<?,?> Retrieves the type with this name in this schema.inthashCode()toString()
-
Field Details
-
jdbcTemplate
-
database
-
name
-
-
Constructor Details
-
BaseSchema
- Parameters:
jdbcTemplate- The Jdbc Template for communicating with the DB.database- The database-specific support.name- The name of the schema.
-
-
Method Details
-
getName
-
exists
public boolean exists() -
doExists
Checks whether this schema exists.- Throws:
SQLException- when the check failed.
-
empty
public boolean empty() -
doEmpty
Checks whether this schema is empty.- Throws:
SQLException- when the check failed.
-
create
public void create()Description copied from interface:SchemaCreates this schema in the database. -
doCreate
Creates this schema in the database.- Throws:
SQLException- when the creation failed.
-
drop
public void drop()Description copied from interface:SchemaDrops this schema from the database. -
doDrop
Drops this schema from the database.- Throws:
SQLException- when the drop failed.
-
clean
public void clean()Description copied from interface:SchemaCleans all the objects in this schema. -
doClean
Cleans all the objects in this schema.- Throws:
SQLException- when the clean failed.
-
allTables
Description copied from interface:SchemaRetrieves all the tables in this schema. -
doAllTables
Retrieves all the tables in this schema.- Throws:
SQLException- when the retrieval failed.
-
allTypes
Retrieves all the types in this schema. -
getType
Retrieves the type with this name in this schema. -
getFunction
Description copied from interface:SchemaRetrieves the function with this name in this schema. -
allFunctions
Retrieves all the functions in this schema. -
doAllFunctions
Retrieves all the functions in this schema.- Throws:
SQLException- when the retrieval failed.
-
toString
-
equals
-
hashCode
public int hashCode()
-