public ValidationErrors validate(Database database) {
    ValidationErrors changeValidationErrors = new ValidationErrors();
    for (SqlStatement statement : generateStatements(database)) {
      boolean supported = SqlGeneratorFactory.getInstance().supports(statement, database);
      if (!supported) {
        if (statement.skipOnUnsupported()) {
          LogFactory.getLogger()
              .info(
                  getChangeMetaData().getName()
                      + " is not supported on "
                      + database.getTypeName()
                      + " but will continue");
        } else {
          changeValidationErrors.addError(
              getChangeMetaData().getName() + " is not supported on " + database.getTypeName());
        }
      } else {
        changeValidationErrors.addAll(
            SqlGeneratorFactory.getInstance().validate(statement, database));
      }
    }

    return changeValidationErrors;
  }
Пример #2
0
 public DbmsChangeSetFilter(Database database) {
   this.databaseString = database.getTypeName();
 }