コード例 #1
0
 @Override
 public void saveRollbackStatement(Change change, List<SqlVisitor> sqlVisitors, Writer writer)
     throws IOException, UnsupportedChangeException, RollbackImpossibleException,
         StatementNotSupportedOnDatabaseException, LiquibaseException {
   SqlStatement[] statements = change.generateRollbackStatements(this);
   for (SqlStatement statement : statements) {
     for (Sql sql : SqlGeneratorFactory.getInstance().generateSql(statement, this)) {
       writer.append(sql.toSql()).append(sql.getEndDelimiter()).append("\n\n");
     }
   }
 }
コード例 #2
0
 @Override
 public void executeRollbackStatements(Change change, List<SqlVisitor> sqlVisitors)
     throws LiquibaseException, UnsupportedChangeException, RollbackImpossibleException {
   SqlStatement[] statements = change.generateRollbackStatements(this);
   List<SqlVisitor> rollbackVisitors = new ArrayList<SqlVisitor>();
   if (sqlVisitors != null) {
     for (SqlVisitor visitor : sqlVisitors) {
       if (visitor.isApplyToRollback()) {
         rollbackVisitors.add(visitor);
       }
     }
   }
   execute(statements, rollbackVisitors);
 }
コード例 #3
0
 @Override
 public void executeRollbackStatements(final Change change, final List<SqlVisitor> sqlVisitors)
     throws LiquibaseException, RollbackImpossibleException {
   final SqlStatement[] statements = change.generateRollbackStatements(this);
   executeRollbackStatements(statements, sqlVisitors);
 }