Package org.compiere.dbPort
Class Convert_PostgreSQL
java.lang.Object
org.compiere.dbPort.Convert
org.compiere.dbPort.Convert_SQL92
org.compiere.dbPort.Convert_PostgreSQL
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
Modifier and TypeFieldDescriptionstatic final int
RegEx: insensitive and dot to include line end charactersFields inherited from class org.compiere.dbPort.Convert
m_conversionError, m_exception, m_stmt, m_verbose
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
convertComplexStatement
(String sqlStatement) Converts Decode and Outer Join.convertStatement
(String sqlStatement) Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statementprotected String
hook for database specific escape of quoted string ( if needed )Get convert map for use in sql convertionboolean
isOracle()
Is Oracle DBMethods inherited from class org.compiere.dbPort.Convert_SQL92
convertDecode, convertDelete, convertOuterJoin, isOperator
Methods inherited from class org.compiere.dbPort.Convert
cleanUpStatement, closeLogMigrationScript, convert, convertAll, convertIt, convertWithConvertMap, execute, getConversionError, getException, getGeneratedMigrationScriptFileName, getMigrationScriptFileName, getMigrationScriptFolder, hasError, isDontLogTable, isLogMigrationScript, logMigrationScript, recoverQuotedStrings, replaceQuotedStrings, setVerbose
-
Field Details
-
REGEX_FLAGS
public static final int REGEX_FLAGSRegEx: insensitive and dot to include line end characters- See Also:
-
-
Constructor Details
-
Convert_PostgreSQL
public Convert_PostgreSQL()Constructor
-
-
Method Details
-
isOracle
public boolean isOracle()Is Oracle DB -
getConvertMap
Description copied from class:Convert
Get convert map for use in sql convertion- Overrides:
getConvertMap
in classConvert
- Returns:
- map
-
convertStatement
Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statement- Specified by:
convertStatement
in classConvert
- Parameters:
sqlStatement
-- Returns:
- converted statement
-
escapeQuotedString
Description copied from class:Convert
hook for database specific escape of quoted string ( if needed )- Overrides:
escapeQuotedString
in classConvert
- Returns:
- string
-
convertComplexStatement
Converts Decode and Outer Join.DECODE (a, 1, 'one', 2, 'two', 'none') => CASE WHEN a = 1 THEN 'one' WHEN a = 2 THEN 'two' ELSE 'none' END
- Parameters:
sqlStatement
-- Returns:
- converted statement
-