clean the convertAlias function

This commit is contained in:
Carlos Ruiz 2007-01-14 06:52:48 +00:00
parent 43168dd1c1
commit 72f7992c90
1 changed files with 1 additions and 14 deletions

View File

@ -1530,20 +1530,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
if (table != null && alias != null ) {
if (alias.indexOf("(") > 0) alias = alias.substring(0, alias.indexOf("("));
String converted = sqlStatement.replaceFirst("\\s"+alias+"\\s", " ");
converted = converted.replaceAll("\\s"+alias+"\\.", " " + table+".");
converted = converted.replaceAll(","+alias+"\\.", "," + table+".");
converted = converted.replaceAll("\\("+alias+"\\.", "(" + table+".");
converted = converted.replaceAll("\\+"+alias+"\\.", "+" + table+".");
converted = converted.replaceAll("\\-"+alias+"\\.", "-" + table+".");
converted = converted.replaceAll("\\*"+alias+"\\.", "*" + table+".");
converted = converted.replaceAll("/"+alias+"\\.", "/" + table+".");
converted = converted.replaceAll("%"+alias+"\\.", "%" + table+".");
converted = converted.replaceAll("="+alias+"\\.", "=" + table+".");
converted = converted.replaceAll("<>"+alias+"\\.", "<>" + table+".");
converted = converted.replaceAll(">"+alias+"\\.", ">" + table+".");
converted = converted.replaceAll("<"+alias+"\\.", "<" + table+".");
converted = converted.replaceAll("<="+alias+"\\.", "<=" + table+".");
converted = converted.replaceAll(">="+alias+"\\.", ">=" + table+".");
converted = converted.replaceAll("\\b"+alias+"\\.", table+".");
return converted;
} else {
return sqlStatement;