Class 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 Details

      • REGEX_FLAGS

        public static final int REGEX_FLAGS
        RegEx: 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
        Specified by:
        isOracle in class Convert
        Returns:
        true if connection 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 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