Class SimpleContext

    • Method Detail

      • getConnection

        public Connection getConnection()
        Specified by:
        getConnection in interface Context
        Returns:
        The JDBC connection being used. Transaction are managed by MigrateDB. When the context is passed to the Callback.handle(Event, Context) method, a transaction will already have been started if required and will be automatically committed or rolled back afterward.
      • getMigrationInfo

        public MigrationInfo getMigrationInfo()
        Specified by:
        getMigrationInfo in interface Context
        Returns:
        The info about the migration being handled. Only relevant for the BEFORE_EACH_* and AFTER_EACH_* events. null in all other cases.
      • getStatement

        public Statement getStatement()
        Specified by:
        getStatement in interface Context
        Returns:
        The info about the statement being handled. Only relevant for the statement-level events. null in all other cases.
      • getOperationResult

        public OperationResult getOperationResult()
        Specified by:
        getOperationResult in interface Context
        Returns:
        The OperationResult object for the finished operation. Only relevant for the AFTER_*_OPERATION_FINISH events.