Class RelXmlWriter

  • All Implemented Interfaces:
    RelWriter

    public class RelXmlWriter
    extends RelWriterImpl
    Callback for a relational expression to dump in XML format.
    • Field Detail

      • xmlOutput

        private final XmlOutput xmlOutput
      • generic

        boolean generic
    • Constructor Detail

      • RelXmlWriter

        public RelXmlWriter​(java.io.PrintWriter pw,
                            SqlExplainLevel detailLevel)
    • Method Detail

      • explain_

        protected void explain_​(RelNode rel,
                                java.util.List<Pair<java.lang.String,​java.lang.Object>> values)
        Overrides:
        explain_ in class RelWriterImpl
      • explainGeneric

        private void explainGeneric​(RelNode rel,
                                    java.util.List<Pair<java.lang.String,​java.lang.Object>> values)
        Generates generic XML (sometimes called 'element-oriented XML'). Like this:
        <RelNode id="1" type="Join">
          <Property name="condition">EMP.DEPTNO = DEPT.DEPTNO</Property>
          <Inputs>
            <RelNode id="2" type="Project">
              <Property name="expr1">x + y</Property>
              <Property name="expr2">45</Property>
            </RelNode>
            <RelNode id="3" type="TableAccess">
              <Property name="table">SALES.EMP</Property>
            </RelNode>
          </Inputs>
        </RelNode>
        Parameters:
        rel - Relational expression
        values - List of term-value pairs
      • explainSpecific

        private void explainSpecific​(RelNode rel,
                                     java.util.List<Pair<java.lang.String,​java.lang.Object>> values)
        Generates specific XML (sometimes called 'attribute-oriented XML'). Like this:
         <Join condition="EMP.DEPTNO = DEPT.DEPTNO">
           <Project expr1="x + y" expr2="42">
           <TableAccess table="SALES.EMPS">
         </Join>
         
        Parameters:
        rel - Relational expression
        values - List of term-value pairs