Package org.flywaydb.database.sqlserver
Class SQLServerSchema
java.lang.Object
org.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>
org.flywaydb.database.sqlserver.SQLServerSchema
- Direct Known Subclasses:
SynapseSchema
public class SQLServerSchema
extends org.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSQL Server object meta-data.protected static enumSQL Server object types for which we support automatic clean-up. -
Field Summary
FieldsFields inherited from class org.flywaydb.core.internal.database.base.Schema
database, jdbcTemplate, name -
Constructor Summary
ConstructorsConstructorDescriptionSQLServerSchema(org.flywaydb.core.internal.jdbc.JdbcTemplate jdbcTemplate, SQLServerDatabase database, String databaseName, String name) -
Method Summary
Modifier and TypeMethodDescriptioncleanObjects(String dropQualifier, SQLServerSchema.ObjectType... objectTypes) protected SQLServerTable[]protected voiddoClean()protected voiddoCreate()protected voiddoDrop()protected booleandoEmpty()protected booleandoExists()org.flywaydb.core.internal.database.base.Tableprotected List<SQLServerSchema.DBObject>queryDBObjects(SQLServerSchema.ObjectType... types) Query objects with any of the given types.Methods inherited from class org.flywaydb.core.internal.database.base.Schema
allFunctions, allTables, allTypes, clean, create, doAllFunctions, drop, empty, equals, exists, getFunction, getName, getType, hashCode, toString
-
Field Details
-
databaseName
-
-
Constructor Details
-
SQLServerSchema
public SQLServerSchema(org.flywaydb.core.internal.jdbc.JdbcTemplate jdbcTemplate, SQLServerDatabase database, String databaseName, String name)
-
-
Method Details
-
doExists
- Specified by:
doExistsin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
doEmpty
- Specified by:
doEmptyin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
doCreate
- Specified by:
doCreatein classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
doDrop
- Specified by:
doDropin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
doClean
- Specified by:
doCleanin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
queryDBObjects
protected List<SQLServerSchema.DBObject> queryDBObjects(SQLServerSchema.ObjectType... types) throws SQLException Query objects with any of the given types.- Parameters:
types- The object types to be queried.- Returns:
- The found objects.
- Throws:
SQLException- when the retrieval failed.
-
cleanTriggers
- Returns:
- The drop statements.
- Throws:
SQLException- when the clean statements could not be generated.
-
cleanSynonyms
- Returns:
- The drop statements.
- Throws:
SQLException- when the clean statements could not be generated.
-
cleanRules
- Returns:
- The drop statements.
- Throws:
SQLException- when the clean statements could not be generated.
-
cleanObjects
protected List<String> cleanObjects(String dropQualifier, SQLServerSchema.ObjectType... objectTypes) throws SQLException - Parameters:
dropQualifier- The type of DROP statement to issue.objectTypes- The type of objects to drop.- Returns:
- The drop statements.
- Throws:
SQLException- when the clean statements could not be generated.
-
doAllTables
- Specified by:
doAllTablesin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable> - Throws:
SQLException
-
getTable
- Specified by:
getTablein classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>
-