Class MySQLDatabase

java.lang.Object
org.flywaydb.core.internal.database.base.Database<MySQLConnection>
org.flywaydb.database.mysql.MySQLDatabase
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
MariaDBDatabase

public class MySQLDatabase extends org.flywaydb.core.internal.database.base.Database<MySQLConnection>
  • Field Summary

    Fields inherited from class org.flywaydb.core.internal.database.base.Database

    configuration, databaseType, jdbcConnectionFactory, jdbcMetaData, jdbcTemplate, rawMainJdbcConnection, statementInterceptor
  • Constructor Summary

    Constructors
    Constructor
    Description
    MySQLDatabase(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.jdbc.JdbcConnectionFactory jdbcConnectionFactory, org.flywaydb.core.internal.jdbc.StatementInterceptor statementInterceptor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected org.flywaydb.core.api.MigrationVersion
     
    protected MySQLConnection
     
    protected String
     
    final void
    ensureSupported(org.flywaydb.core.api.configuration.Configuration configuration)
     
     
     
     
    protected String
     
     
    getRawCreateScript(org.flywaydb.core.internal.database.base.Table table, boolean baseline)
     
    protected boolean
     
    boolean
     
    boolean
     
    boolean
     

    Methods inherited from class org.flywaydb.core.internal.database.base.Database

    cleanPostSchemas, cleanPreSchemas, close, computeVersionDisplayName, disposeEventConnection, doCleanPostSchemas, doCleanPreSchemas, doGetCatalog, doQuote, ensureDatabaseIsRecentEnough, ensureDatabaseNotOlderThanOtherwiseRecommendUpgradeToFlywayEdition, getAllSchemas, getBaselineStatement, getCatalog, getConfiguration, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getDeleteStatement, getEscapedQuote, getEventConnection, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getSelectStatement, getUpdateStatement, getVersion, hasEventConnection, notifyDatabaseIsNotFormallySupported, quote, recommendFlywayUpgradeIfNecessary, recommendFlywayUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MySQLDatabase

      public MySQLDatabase(org.flywaydb.core.api.configuration.Configuration configuration, org.flywaydb.core.internal.jdbc.JdbcConnectionFactory jdbcConnectionFactory, org.flywaydb.core.internal.jdbc.StatementInterceptor statementInterceptor)
  • Method Details

    • isWsrepOn

      public boolean isWsrepOn()
    • isCreateTableAsSelectAllowed

      protected boolean isCreateTableAsSelectAllowed()
    • getRawCreateScript

      public String getRawCreateScript(org.flywaydb.core.internal.database.base.Table table, boolean baseline)
      Specified by:
      getRawCreateScript in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • getConstraintName

      protected String getConstraintName(String tableName)
    • doGetConnection

      protected MySQLConnection doGetConnection(Connection connection)
      Specified by:
      doGetConnection in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • determineVersion

      protected org.flywaydb.core.api.MigrationVersion determineVersion()
      Overrides:
      determineVersion in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • ensureSupported

      public final void ensureSupported(org.flywaydb.core.api.configuration.Configuration configuration)
      Specified by:
      ensureSupported in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • doGetCurrentUser

      protected String doGetCurrentUser() throws SQLException
      Overrides:
      doGetCurrentUser in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
      Throws:
      SQLException
    • supportsDdlTransactions

      public boolean supportsDdlTransactions()
      Specified by:
      supportsDdlTransactions in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • getBooleanTrue

      public String getBooleanTrue()
      Specified by:
      getBooleanTrue in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • getBooleanFalse

      public String getBooleanFalse()
      Specified by:
      getBooleanFalse in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • getOpenQuote

      public String getOpenQuote()
      Overrides:
      getOpenQuote in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • getCloseQuote

      public String getCloseQuote()
      Overrides:
      getCloseQuote in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • catalogIsSchema

      public boolean catalogIsSchema()
      Specified by:
      catalogIsSchema in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
    • useSingleConnection

      public boolean useSingleConnection()
      Overrides:
      useSingleConnection in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>