Class SimpleDmlParser

  • All Implemented Interfaces:
    DmlParser

    public class SimpleDmlParser
    extends Object
    implements DmlParser
    This class does parsing of simple DML: insert, update, delete. LogMiner supplies very simple syntax , that this parser should be sufficient to parse those. It does no support joins, merge, sub-selects and other complicated cases, which should be OK for LogMiner case
    • Constructor Detail

      • SimpleDmlParser

        public SimpleDmlParser​(String catalogName,
                               OracleValueConverters converter)
        Constructor
        Parameters:
        catalogName - database name
        converter - value converter
    • Method Detail

      • parse

        public LogMinerDmlEntry parse​(String dmlContent,
                                      Table table,
                                      String txId)
        This parses a DML
        Specified by:
        parse in interface DmlParser
        Parameters:
        dmlContent - DML
        table - the table
        txId - the current transaction id the sql is part of.
        Returns:
        parsed value holder class
      • initColumns

        private void initColumns​(Table table,
                                 String tableName)
      • parseUpdate

        private void parseUpdate​(Table table,
                                 net.sf.jsqlparser.statement.update.Update st)
                          throws net.sf.jsqlparser.JSQLParserException
        Throws:
        net.sf.jsqlparser.JSQLParserException
      • parseInsert

        private void parseInsert​(Table table,
                                 net.sf.jsqlparser.statement.insert.Insert st)
      • parseDelete

        private void parseDelete​(Table table,
                                 net.sf.jsqlparser.statement.delete.Delete st)
      • setNewValues

        private void setNewValues​(List<net.sf.jsqlparser.expression.Expression> expressions,
                                  List<net.sf.jsqlparser.schema.Column> columns)
      • parseWhereClause

        private void parseWhereClause​(net.sf.jsqlparser.expression.Expression logicalExpression)