Class MySQLDatabase
java.lang.Object
migratedb.v1.core.internal.database.base.BaseDatabase<MySQLConnection>
migratedb.v1.core.internal.database.mysql.MySQLDatabase
- All Implemented Interfaces:
Closeable,AutoCloseable,Database<MySQLConnection>
- Direct Known Subclasses:
MariaDBDatabase,TiDBDatabase
-
Field Summary
Fields inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
configuration, databaseType, jdbcConnectionFactory, jdbcMetaData, jdbcTemplate, rawMainJdbcConnection -
Constructor Summary
ConstructorsConstructorDescriptionMySQLDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected Versionprotected MySQLConnectiondoGetConnection(Connection connection) Retrieves a MigrateDB Connection for this JDBC connection.protected Stringfinal voidEnsure MigrateDB supports this version of this database.protected StringgetConstraintName(String tableName) getRawCreateScript(Table<?, ?> table, boolean baseline) protected booleanbooleanbooleanbooleanMethods inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
cleanPostSchemas, cleanPreSchemas, close, computeVersionDisplayName, doCleanPostSchemas, doCleanPreSchemas, doGetCatalog, doQuote, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getEscapedQuote, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getSelectStatement, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote
-
Constructor Details
-
MySQLDatabase
-
-
Method Details
-
isCreateTableAsSelectAllowed
protected boolean isCreateTableAsSelectAllowed() -
getRawCreateScript
-
getConstraintName
-
doGetConnection
Description copied from class:BaseDatabaseRetrieves a MigrateDB Connection for this JDBC connection.- Specified by:
doGetConnectionin classBaseDatabase<MySQLConnection>
-
determineVersion
- Overrides:
determineVersionin classBaseDatabase<MySQLConnection>- Returns:
- The major and minor version of the database.
-
ensureSupported
public final void ensureSupported()Description copied from interface:DatabaseEnsure MigrateDB supports this version of this database. -
doGetCurrentUser
- Overrides:
doGetCurrentUserin classBaseDatabase<MySQLConnection>- 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.
-
getOpenQuote
- Overrides:
getOpenQuotein classBaseDatabase<MySQLConnection>
-
getCloseQuote
- Overrides:
getCloseQuotein classBaseDatabase<MySQLConnection>
-
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<MySQLConnection>- Overrides:
useSingleConnectionin classBaseDatabase<MySQLConnection>- Returns:
- Whether to use a single connection for both schema history table management and applying migrations.
-