Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.SetClauseList


       
        update.addChange(new ElementSymbol("e1"), new Constant("1")); //$NON-NLS-1$ //$NON-NLS-2$
       
        assertTrue(RelationalNodeUtil.shouldExecute(update, false));
       
        update.setChangeList(new SetClauseList());
       
        assertFalse(RelationalNodeUtil.shouldExecute(update, false));
    }
View Full Code Here


      }
      return rewriteInherentUpdate(update, info);
    }
   
    if (commandType == Command.TYPE_UPDATE && variables != null) {
          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

        helpStmtTest("execute string z as a1 string, a2 integer into #g update 1;", "EXECUTE z AS a1 string, a2 integer INTO #g UPDATE 1;", //$NON-NLS-1$ //$NON-NLS-2$
        cmdStmt);      
    }
   
    @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

        ElementSymbol a1 = new ElementSymbol("a1"); //$NON-NLS-1$
        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

Related Classes of org.teiid.query.sql.lang.SetClauseList

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.