Package org.compiere.dbPort
Class Convert_PostgreSQL
- java.lang.Object
-
- org.compiere.dbPort.Convert
-
- org.compiere.dbPort.Convert_SQL92
-
- org.compiere.dbPort.Convert_PostgreSQL
-
public class Convert_PostgreSQL extends Convert_SQL92
Convert Oracle SQL to PostgreSQL SQL- Author:
- Victor Perez, Low Heng Sin, Carlos Ruiz, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1824256 ] Convert sql casts
-
-
Field Summary
Fields Modifier and Type Field Description static int
REGEX_FLAGS
RegEx: insensitive and dot to include line end characters-
Fields inherited from class org.compiere.dbPort.Convert
m_conversionError, m_exception, m_stmt, m_verbose
-
-
Constructor Summary
Constructors Constructor Description Convert_PostgreSQL()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convertComplexStatement(String sqlStatement)
Converts Decode and Outer Join.String
convertOracleStatement(String sqlStatement)
Convert Oracle SQL statement to PostgreSQL syntaxprotected ArrayList<String>
convertStatement(String sqlStatement)
Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statementprotected String
escapeQuotedString(String in)
hook for database specific escape of quoted string ( if needed )protected Map<String,String>
getConvertMap()
Get convert map for use in sql convertionboolean
isOracle()
Is Oracle DB-
Methods inherited from class org.compiere.dbPort.Convert_SQL92
convertDecode, convertDelete, convertOuterJoin, isOperator
-
Methods inherited from class org.compiere.dbPort.Convert
cleanUpStatement, convert, convertAll, convertIt, convertWithConvertMap, execute, getConversionError, getException, hasError, isLogMigrationScript, logMigrationScript, recoverQuotedStrings, replaceQuotedStrings, setVerbose
-
-
-
-
Field Detail
-
REGEX_FLAGS
public static final int REGEX_FLAGS
RegEx: insensitive and dot to include line end characters- See Also:
- Constant Field Values
-
-
Method Detail
-
isOracle
public boolean isOracle()
Is Oracle DB
-
getConvertMap
protected Map<String,String> getConvertMap()
Description copied from class:Convert
Get convert map for use in sql convertion- Overrides:
getConvertMap
in classConvert
- Returns:
- map
-
convertStatement
protected ArrayList<String> convertStatement(String sqlStatement)
Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statement- Specified by:
convertStatement
in classConvert
- Parameters:
sqlStatement
-- Returns:
- converted statement
-
convertOracleStatement
public String convertOracleStatement(String sqlStatement)
Convert Oracle SQL statement to PostgreSQL syntax- Parameters:
sqlStatement
- oracle sql statement- Returns:
- PostgreSQL statement
-
escapeQuotedString
protected String escapeQuotedString(String in)
Description copied from class:Convert
hook for database specific escape of quoted string ( if needed )- Overrides:
escapeQuotedString
in classConvert
- Returns:
- string
-
-