public static ParameterizedVisitor createParameterizedOutputVisitor(
      Appendable out, String dbType) {
    if (JdbcUtils.ORACLE.equals(dbType) || JdbcUtils.ALI_ORACLE.equals(dbType)) {
      return new OracleParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.MYSQL.equals(dbType)) {
      return new MySqlParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.MARIADB.equals(dbType)) {
      return new MySqlParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.H2.equals(dbType)) {
      return new MySqlParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.POSTGRESQL.equals(dbType)) {
      return new PGParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.SQL_SERVER.equals(dbType) || JdbcUtils.JTDS.equals(dbType)) {
      return new SQLServerParameterizedOutputVisitor(out);
    }

    if (JdbcUtils.DB2.equals(dbType)) {
      return new DB2ParameterizedOutputVisitor(out);
    }

    return new ParameterizedOutputVisitor(out);
  }
  public static ExportParameterVisitor createExportParameterVisitor(
      final Appendable out, final String dbType) {

    if (JdbcUtils.MYSQL.equals(dbType)) {
      return new MySqlExportParameterVisitor(out);
    }
    if (JdbcUtils.ORACLE.equals(dbType) || JdbcUtils.ALI_ORACLE.equals(dbType)) {
      return new OracleExportParameterVisitor(out);
    }
    if (JdbcUtils.DB2.equals(dbType)) {
      return new DB2ExportParameterVisitor(out);
    }

    if (JdbcUtils.MARIADB.equals(dbType)) {
      return new MySqlExportParameterVisitor(out);
    }

    if (JdbcUtils.H2.equals(dbType)) {
      return new MySqlExportParameterVisitor(out);
    }
    if (JdbcUtils.POSTGRESQL.equals(dbType)) {
      return new PGExportParameterVisitor(out);
    }
    if (JdbcUtils.SQL_SERVER.equals(dbType) || JdbcUtils.JTDS.equals(dbType)) {
      return new MSSQLServerExportParameterVisitor(out);
    }
    return new ExportParameterizedOutputVisitor(out);
  }
Example #3
0
  public static SQLEvalVisitor createEvalVisitor(String dbType) {
    if (JdbcUtils.MYSQL.equals(dbType)) {
      return new MySqlEvalVisitorImpl();
    }

    if (JdbcUtils.H2.equals(dbType)) {
      return new MySqlEvalVisitorImpl();
    }

    if (JdbcUtils.ORACLE.equals(dbType) || JdbcUtils.ALI_ORACLE.equals(dbType)) {
      return new OracleEvalVisitor();
    }

    if (JdbcUtils.POSTGRESQL.equals(dbType)) {
      return new PGEvalVisitor();
    }

    return new SQLEvalVisitorImpl();
  }