IDEMPIERE-4465 Native Postgres - Error on Convert Layer (#400)
* IDEMPIERE-4465 Native Postgres - Error on Convert Layer * IDEMPIERE-4465 Native Postgres - Error on Convert Layer
This commit is contained in:
parent
b778904d42
commit
71049fa02b
|
@ -81,13 +81,6 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
||||||
*/
|
*/
|
||||||
protected ArrayList<String> convertStatement(String sqlStatement) {
|
protected ArrayList<String> convertStatement(String sqlStatement) {
|
||||||
ArrayList<String> result = new ArrayList<String>();
|
ArrayList<String> result = new ArrayList<String>();
|
||||||
if (DB_PostgreSQL.isUseNativeDialect()) {
|
|
||||||
sqlStatement = convertSysDate(sqlStatement);
|
|
||||||
sqlStatement = convertSimilarTo(sqlStatement);
|
|
||||||
result.add(sqlStatement);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Vector to save previous values of quoted strings **/
|
/** Vector to save previous values of quoted strings **/
|
||||||
Vector<String> retVars = new Vector<String>();
|
Vector<String> retVars = new Vector<String>();
|
||||||
|
|
||||||
|
@ -100,6 +93,14 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
||||||
}
|
}
|
||||||
|
|
||||||
String statement = replaceQuotedStrings(sqlStatement, retVars, nonce);
|
String statement = replaceQuotedStrings(sqlStatement, retVars, nonce);
|
||||||
|
|
||||||
|
if (DB_PostgreSQL.isUseNativeDialect()) {
|
||||||
|
|
||||||
|
statement = convertSysDate(statement);
|
||||||
|
statement = convertSimilarTo(statement);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
statement = convertWithConvertMap(statement);
|
statement = convertWithConvertMap(statement);
|
||||||
statement = convertSimilarTo(statement);
|
statement = convertSimilarTo(statement);
|
||||||
statement = DB_PostgreSQL.removeNativeKeyworkMarker(statement);
|
statement = DB_PostgreSQL.removeNativeKeyworkMarker(statement);
|
||||||
|
@ -134,6 +135,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
||||||
} else {
|
} else {
|
||||||
statement = convertComplexStatement(convertAlias(statement));
|
statement = convertComplexStatement(convertAlias(statement));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (retVars.size() > 0)
|
if (retVars.size() > 0)
|
||||||
statement = recoverQuotedStrings(statement, retVars, nonce);
|
statement = recoverQuotedStrings(statement, retVars, nonce);
|
||||||
result.add(statement);
|
result.add(statement);
|
||||||
|
|
Loading…
Reference in New Issue