use of org.dbflute.logic.replaceschema.process.DfTakeFinallyProcess in project dbflute-core by dbflute.
the class DfAlterCheckProcess method takeFinally.
// -----------------------------------------------------
// Take Finally
// ------------
protected void takeFinally(DfAlterCheckFinalInfo finalInfo) {
// alter-take-finally.sql for assertion
final String sqlRootDir = getMigrationAlterDirectory();
final DfTakeFinallyProcess process = DfTakeFinallyProcess.createAsAlterSchema(sqlRootDir, _dataSource);
final DfTakeFinallyFinalInfo takeFinally = process.execute();
finalInfo.addAlterSqlFileAll(takeFinally.getTakeFinallySqlFileList());
reflectTakeFinallyResultToFinalInfo(finalInfo, takeFinally);
}
use of org.dbflute.logic.replaceschema.process.DfTakeFinallyProcess in project dbflute-core by dbflute.
the class DfTakeAssertTask method doExecute.
// ===================================================================================
// Execute
// =======
@Override
protected void doExecute() {
final String sqlRootDir = Srl.is_NotNull_and_NotTrimmedEmpty(_sqlRootDir) ? _sqlRootDir : "./playsql";
final DfTakeFinallyProcess process = DfTakeFinallyProcess.createAsTakeAssert(sqlRootDir, getDataSource());
_finalInfo = process.execute();
final SQLFailureException breakCause = _finalInfo.getBreakCause();
if (breakCause != null) {
// high priority exception
throw breakCause;
}
// get exceptions from this method when take-assert
// (then the finalInfo does not have an exception)
_takeAssertExList = process.getTakeAssertExList();
handleSQLFailure();
handleAssertionFailure(sqlRootDir);
}
use of org.dbflute.logic.replaceschema.process.DfTakeFinallyProcess in project dbflute-core by dbflute.
the class DfReplaceSchemaTask method takeFinally.
// -----------------------------------------------------
// Take Finally
// ------------
protected void takeFinally(String sqlRootDir, boolean previous) {
final DfTakeFinallyProcess process = createTakeFinallyProcess(sqlRootDir, previous);
_takeFinallyFinalInfo = process.execute();
final SQLFailureException breakCause = _takeFinallyFinalInfo.getBreakCause();
if (breakCause != null) {
// high priority exception
throw breakCause;
}
final DfTakeFinallyAssertionFailureException assertionEx = _takeFinallyFinalInfo.getAssertionEx();
if (assertionEx != null) {
// high priority exception
throw assertionEx;
}
}
Aggregations