Class MySQLConnection

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

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

      • Fields inherited from class org.flywaydb.core.internal.database.base.Connection

        database, jdbcTemplate, originalSchemaNameOrSearchPath
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canUseNamedLockTemplate()  
      void doChangeCurrentSchemaOrSearchPathTo​(java.lang.String schema)  
      protected org.flywaydb.core.internal.database.base.Schema doGetCurrentSchema()  
      protected void doRestoreOriginalState()  
      protected java.lang.String getCurrentSchemaNameOrSearchPath()  
      org.flywaydb.core.internal.database.base.Schema getSchema​(java.lang.String name)  
      <T> T lock​(org.flywaydb.core.internal.database.base.Table table, java.util.concurrent.Callable<T> callable)  
      • Methods inherited from class org.flywaydb.core.internal.database.base.Connection

        changeCurrentSchemaTo, close, getCurrentSchema, getJdbcConnection, getJdbcTemplate, restoreOriginalState
      • Methods inherited from class java.lang.Object

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

      • MySQLConnection

        public MySQLConnection​(MySQLDatabase database,
                               java.sql.Connection connection)
    • Method Detail

      • doRestoreOriginalState

        protected void doRestoreOriginalState()
                                       throws java.sql.SQLException
        Overrides:
        doRestoreOriginalState in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
        Throws:
        java.sql.SQLException
      • getCurrentSchemaNameOrSearchPath

        protected java.lang.String getCurrentSchemaNameOrSearchPath()
                                                             throws java.sql.SQLException
        Specified by:
        getCurrentSchemaNameOrSearchPath in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
        Throws:
        java.sql.SQLException
      • doChangeCurrentSchemaOrSearchPathTo

        public void doChangeCurrentSchemaOrSearchPathTo​(java.lang.String schema)
                                                 throws java.sql.SQLException
        Overrides:
        doChangeCurrentSchemaOrSearchPathTo in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
        Throws:
        java.sql.SQLException
      • doGetCurrentSchema

        protected org.flywaydb.core.internal.database.base.Schema doGetCurrentSchema()
                                                                              throws java.sql.SQLException
        Overrides:
        doGetCurrentSchema in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
        Throws:
        java.sql.SQLException
      • getSchema

        public org.flywaydb.core.internal.database.base.Schema getSchema​(java.lang.String name)
        Specified by:
        getSchema in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
      • lock

        public <T> T lock​(org.flywaydb.core.internal.database.base.Table table,
                          java.util.concurrent.Callable<T> callable)
        Overrides:
        lock in class org.flywaydb.core.internal.database.base.Connection<MySQLDatabase>
      • canUseNamedLockTemplate

        protected boolean canUseNamedLockTemplate()