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 Classes Modifier and Type Class Description static classSQLServerSchema.DBObjectSQL Server object meta-data.protected static classSQLServerSchema.ObjectTypeSQL Server object types for which we support automatic clean-up.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringdatabaseName
-
Constructor Summary
Constructors Constructor Description SQLServerSchema(org.flywaydb.core.internal.jdbc.JdbcTemplate jdbcTemplate, SQLServerDatabase database, java.lang.String databaseName, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>cleanObjects(java.lang.String dropQualifier, SQLServerSchema.ObjectType... objectTypes)protected java.util.List<java.lang.String>cleanRules()protected java.util.List<java.lang.String>cleanSynonyms()protected java.util.List<java.lang.String>cleanTriggers()protected SQLServerTable[]doAllTables()protected voiddoClean()protected voiddoCreate()protected voiddoDrop()protected booleandoEmpty()protected booleandoExists()org.flywaydb.core.internal.database.base.TablegetTable(java.lang.String tableName)protected java.util.List<SQLServerSchema.DBObject>queryDBObjects(SQLServerSchema.ObjectType... types)Query objects with any of the given types.
-
-
-
Constructor Detail
-
SQLServerSchema
public SQLServerSchema(org.flywaydb.core.internal.jdbc.JdbcTemplate jdbcTemplate, SQLServerDatabase database, java.lang.String databaseName, java.lang.String name)
-
-
Method Detail
-
doExists
protected boolean doExists() throws java.sql.SQLException- Specified by:
doExistsin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
doEmpty
protected boolean doEmpty() throws java.sql.SQLException- Specified by:
doEmptyin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
doCreate
protected void doCreate() throws java.sql.SQLException- Specified by:
doCreatein classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
doDrop
protected void doDrop() throws java.sql.SQLException- Specified by:
doDropin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
doClean
protected void doClean() throws java.sql.SQLException- Specified by:
doCleanin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
queryDBObjects
protected java.util.List<SQLServerSchema.DBObject> queryDBObjects(SQLServerSchema.ObjectType... types) throws java.sql.SQLException
Query objects with any of the given types.- Parameters:
types- The object types to be queried.- Returns:
- The found objects.
- Throws:
java.sql.SQLException- when the retrieval failed.
-
cleanTriggers
protected java.util.List<java.lang.String> cleanTriggers() throws java.sql.SQLException- Returns:
- The drop statements.
- Throws:
java.sql.SQLException- when the clean statements could not be generated.
-
cleanSynonyms
protected java.util.List<java.lang.String> cleanSynonyms() throws java.sql.SQLException- Returns:
- The drop statements.
- Throws:
java.sql.SQLException- when the clean statements could not be generated.
-
cleanRules
protected java.util.List<java.lang.String> cleanRules() throws java.sql.SQLException- Returns:
- The drop statements.
- Throws:
java.sql.SQLException- when the clean statements could not be generated.
-
cleanObjects
protected java.util.List<java.lang.String> cleanObjects(java.lang.String dropQualifier, SQLServerSchema.ObjectType... objectTypes) throws java.sql.SQLException- Parameters:
dropQualifier- The type of DROP statement to issue.objectTypes- The type of objects to drop.- Returns:
- The drop statements.
- Throws:
java.sql.SQLException- when the clean statements could not be generated.
-
doAllTables
protected SQLServerTable[] doAllTables() throws java.sql.SQLException
- Specified by:
doAllTablesin classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>- Throws:
java.sql.SQLException
-
getTable
public org.flywaydb.core.internal.database.base.Table getTable(java.lang.String tableName)
- Specified by:
getTablein classorg.flywaydb.core.internal.database.base.Schema<SQLServerDatabase,SQLServerTable>
-
-