Package org.teiid.query.processor.xml

Examples of org.teiid.query.processor.xml.JoinedWhileInstruction


        String source = node.getActualResultSetName();
        ResultSetInfo info= node.getResultSetInfo();
       
        if (info.isJoinedWithParent()) {
            //create a dependent while loop
            JoinedWhileInstruction whileInst = new JoinedWhileInstruction(source, new Integer(info.getMappingClassNumber()),
                                                                          info.getMappingClassSymbol(), node.getResultName());
            currentProgram.addInstruction(whileInst);
           
            Program childProgram = new Program();
            whileInst.setBlockProgram(childProgram);
           
            programStack.push(childProgram);
            return;
        }
       
        // Add instruction to execute relational query
        ExecSqlInstruction sqlInst = new ExecSqlInstruction(source, info);
        currentProgram.addInstruction(sqlInst);
       
        BlockInstruction blockInst = new BlockInstruction(source);
        currentProgram.addInstruction(blockInst);
       
        // Add instruction to read the first row in
        MoveCursorInstruction moveCursor = new MoveCursorInstruction(source);
        currentProgram.addInstruction(moveCursor);

        // set up while instruction, add sub Program
        WhileInstruction whileInst = new WhileInstruction(source);
        currentProgram.addInstruction(whileInst);
       
        Program childProgram = new Program();
        whileInst.setBlockProgram(childProgram);

        // when while is done close the resultset(note that the child program will
        // have all the statements.
        EndBlockInstruction closeInst = new EndBlockInstruction(source);
        currentProgram.addInstruction(closeInst);       
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.xml.JoinedWhileInstruction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.