Adempiere 3.5.2a

org.compiere.dbPort
Class Convert_PostgreSQL

java.lang.Object
  extended by org.compiere.dbPort.Convert
      extended by org.compiere.dbPort.Convert_SQL92
          extended by 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
    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
    Convert_PostgreSQL()
              Cosntructor
     
    Method Summary
    protected  String convertComplexStatement(String sqlStatement)
              Converts Decode and Outer Join.
    protected  ArrayList<String> convertStatement(String sqlStatement)
              Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statement
    protected  String escapeQuotedString(String in)
              hook for database specific escape of quoted string ( if needed )
    protected  Map getConvertMap()
              Get convert map for use in sql convertion
     boolean 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, logMigrationScript, recoverQuotedStrings, replaceQuotedStrings, setVerbose
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    REGEX_FLAGS

    public static final int REGEX_FLAGS
    RegEx: insensitive and dot to include line end characters

    See Also:
    Constant Field Values
    Constructor Detail

    Convert_PostgreSQL

    public Convert_PostgreSQL()
    Cosntructor

    Method Detail

    isOracle

    public boolean isOracle()
    Is Oracle DB

    Specified by:
    isOracle in class Convert
    Returns:
    true if connection is Oracle DB

    getConvertMap

    protected Map getConvertMap()
    Description copied from class: Convert
    Get convert map for use in sql convertion

    Overrides:
    getConvertMap in class Convert
    Returns:
    map

    convertStatement

    protected ArrayList<String> convertStatement(String sqlStatement)
    Convert single Statements. - remove comments - process FUNCTION/TRIGGER/PROCEDURE - process Statement

    Specified by:
    convertStatement in class Convert
    Parameters:
    sqlStatement -
    Returns:
    converted 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 class Convert
    Returns:
    string

    convertComplexStatement

    protected String convertComplexStatement(String sqlStatement)
    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

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.