Class SQLServerDatabase
java.lang.Object
migratedb.v1.core.internal.database.base.BaseDatabase<SQLServerConnection>
migratedb.v1.core.internal.database.sqlserver.SQLServerDatabase
- All Implemented Interfaces:
Closeable,AutoCloseable,Database<SQLServerConnection>
- Direct Known Subclasses:
SynapseDatabase
-
Field Summary
Fields inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
configuration, databaseType, jdbcConnectionFactory, jdbcMetaData, jdbcTemplate, rawMainJdbcConnection -
Constructor Summary
ConstructorsConstructorDescriptionSQLServerDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected StringcomputeVersionDisplayName(Version version) Compute the user-friendly display name for this database version.protected voiddoCleanPostSchemas(Schema<?, ?>[] schemas) Cleans all the objects in this database that need to be cleaned after cleaning schemas.protected SQLServerConnectiondoGetConnection(Connection connection) Retrieves a MigrateDB Connection for this JDBC connection.protected StringQuotes this identifier for use in SQL queries.final voidEnsure MigrateDB supports this version of this database.getRawCreateScript(Table<?, ?> table, boolean baseline) protected booleanbooleanbooleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanbooleanMethods inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
cleanPostSchemas, cleanPreSchemas, close, determineVersion, doCleanPreSchemas, doGetCatalog, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCreateScript, getCurrentUser, getDatabaseType, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getSelectStatement, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote
-
Constructor Details
-
SQLServerDatabase
-
-
Method Details
-
doGetConnection
Description copied from class:BaseDatabaseRetrieves a MigrateDB Connection for this JDBC connection.- Specified by:
doGetConnectionin classBaseDatabase<SQLServerConnection>
-
ensureSupported
public final void ensureSupported()Description copied from interface:DatabaseEnsure MigrateDB supports this version of this database. -
computeVersionDisplayName
Description copied from class:BaseDatabaseCompute the user-friendly display name for this database version.- Overrides:
computeVersionDisplayNamein classBaseDatabase<SQLServerConnection>
-
getDefaultDelimiter
- Specified by:
getDefaultDelimiterin interfaceDatabase<SQLServerConnection>- Overrides:
getDefaultDelimiterin classBaseDatabase<SQLServerConnection>
-
doGetCurrentUser
- Overrides:
doGetCurrentUserin classBaseDatabase<SQLServerConnection>- Throws:
SQLException
-
supportsDdlTransactions
public boolean supportsDdlTransactions() -
supportsChangingCurrentSchema
public boolean supportsChangingCurrentSchema() -
getBooleanTrue
- Returns:
- The representation of the value
truein a boolean column.
-
getBooleanFalse
- Returns:
- The representation of the value
falsein a boolean column.
-
doQuote
Description copied from class:BaseDatabaseQuotes this identifier for use in SQL queries.- Overrides:
doQuotein classBaseDatabase<SQLServerConnection>
-
getOpenQuote
- Overrides:
getOpenQuotein classBaseDatabase<SQLServerConnection>
-
getCloseQuote
- Overrides:
getCloseQuotein classBaseDatabase<SQLServerConnection>
-
getEscapedQuote
- Overrides:
getEscapedQuotein classBaseDatabase<SQLServerConnection>
-
catalogIsSchema
public boolean catalogIsSchema()- Returns:
trueif this database uses a catalog to represent a schema, orfalseif a schema is simply a schema.
-
useSingleConnection
public boolean useSingleConnection()- Specified by:
useSingleConnectionin interfaceDatabase<SQLServerConnection>- Overrides:
useSingleConnectionin classBaseDatabase<SQLServerConnection>- Returns:
- Whether to use a single connection for both schema history table management and applying migrations.
-
getRawCreateScript
-
supportsPartitions
protected boolean supportsPartitions() -
supportsSequences
protected boolean supportsSequences() -
supportsSynonyms
protected boolean supportsSynonyms() -
supportsRules
protected boolean supportsRules() -
supportsTypes
protected boolean supportsTypes() -
supportsTriggers
protected boolean supportsTriggers() -
supportsAssemblies
protected boolean supportsAssemblies() -
doCleanPostSchemas
Cleans all the objects in this database that need to be cleaned after cleaning schemas.- Overrides:
doCleanPostSchemasin classBaseDatabase<SQLServerConnection>- Parameters:
schemas- The list of schemas managed by MigrateDb- Throws:
SQLException- when the clean failed.
-