Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.SetClauseList.addClause()


          SetClauseList newChangeList = new SetClauseList();
          for (SetClause entry : update.getChangeList().getClauses()) {
              Expression rightExpr = entry.getValue();
              boolean retainChange = checkInputVariables(rightExpr);
              if (retainChange) {
                  newChangeList.addClause(entry.getSymbol(), entry.getValue());
              }
          }
          update.setChangeList(newChangeList);
        }
View Full Code Here


   
    @Test public void testDynamicCommandStatementWithUsing() throws Exception {
        SetClauseList using = new SetClauseList();
       
        ElementSymbol a = new ElementSymbol("a"); //$NON-NLS-1$
        using.addClause(a, new ElementSymbol("b"))//$NON-NLS-1$
               
        DynamicCommand sqlCmd = new DynamicCommand();
        Expression sql = new ElementSymbol("z"); //$NON-NLS-1$
       
        sqlCmd.setSql(sql);
View Full Code Here

        a1.setType(DataTypeManager.DefaultDataClasses.STRING);
        symbols.add(a1);
        Expression sql = new Constant("SELECT * FROM g"); //$NON-NLS-1$
       
        SetClauseList using = new SetClauseList();
        using.addClause(a1, a1);       
       
        DynamicCommand sqlCmd = new DynamicCommand(sql, symbols, new GroupSymbol("#g"), using); //$NON-NLS-1$
       
        UnitTestUtil.helpTestEquivalence(0, sqlCmd, sqlCmd.clone());    
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.