clean the convertAlias function
This commit is contained in:
parent
43168dd1c1
commit
72f7992c90
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue