Class MySQLDatabase

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean catalogIsSchema()  
      protected org.flywaydb.core.api.MigrationVersion determineVersion()  
      protected MySQLConnection doGetConnection​(java.sql.Connection connection)  
      protected java.lang.String doGetCurrentUser()  
      void ensureSupported()  
      java.lang.String getBooleanFalse()  
      java.lang.String getBooleanTrue()  
      java.lang.String getCloseQuote()  
      protected java.lang.String getConstraintName​(java.lang.String tableName)  
      java.lang.String getOpenQuote()  
      java.lang.String getRawCreateScript​(org.flywaydb.core.internal.database.base.Table table, boolean baseline)  
      protected boolean isCreateTableAsSelectAllowed()  
      boolean supportsDdlTransactions()  
      boolean useSingleConnection()  
      • Methods inherited from class org.flywaydb.core.internal.database.base.Database

        cleanPostSchemas, cleanPreSchemas, close, computeVersionDisplayName, doCleanPostSchemas, doCleanPreSchemas, doGetCatalog, doQuote, ensureDatabaseIsRecentEnough, ensureDatabaseNotOlderThanOtherwiseRecommendUpgradeToFlywayEdition, getAllSchemas, getBaselineStatement, getCatalog, getConfiguration, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getEscapedQuote, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getSelectStatement, getVersion, 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 Detail

      • 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 Detail

      • isCreateTableAsSelectAllowed

        protected boolean isCreateTableAsSelectAllowed()
      • getRawCreateScript

        public java.lang.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 java.lang.String getConstraintName​(java.lang.String tableName)
      • doGetConnection

        protected MySQLConnection doGetConnection​(java.sql.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()
        Specified by:
        ensureSupported in class org.flywaydb.core.internal.database.base.Database<MySQLConnection>
      • doGetCurrentUser

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

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

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

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

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

        public java.lang.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>