Examples of AssignmentStatement


Examples of org.teiid.query.sql.proc.AssignmentStatement

    Query query = (Query) QueryParser.getQueryParser().parseCommand("Select x from y"); //$NON-NLS-1$
    assertEquals("Didn't get the same parts ", ((ScalarSubquery)s2.getExpression()).getCommand(), query); //$NON-NLS-1$
  }
 
  public void testSelfEquivalence(){
    AssignmentStatement s1 = sample1();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, s1, s1);
  }
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, s1, s1);
  }

  public void testEquivalence(){
    AssignmentStatement s1 = sample1();
    AssignmentStatement s1a = sample1();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, s1, s1a);
  }
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, s1, s1a);
  }
 
  public void testNonEquivalence(){
    AssignmentStatement s1 = sample1();
    AssignmentStatement s2 = sample2();
    int equals = -1;
    UnitTestUtil.helpTestEquivalence(equals, s1, s2);
  }
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

        RaiseErrorStatement errStmt =   new RaiseErrorStatement(new ElementSymbol("a")); //$NON-NLS-1$
        helpTest(errStmt, "ERROR a;"); //$NON-NLS-1$
    }
   
    public void testAssignmentStatement1() {
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
    helpTest(assigStmt, "a = 1;"); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

        q1.setSelect(select);       
        From from = new From();
        from.addGroup(new GroupSymbol("g")); //$NON-NLS-1$
        q1.setFrom(from);
             
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), q1); //$NON-NLS-1$
    helpTest(assigStmt, "a = (SELECT x FROM g);"); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

   
    public void testBlock1() {
        Delete d1 = new Delete();
        d1.setGroup(new GroupSymbol("g")); //$NON-NLS-1$
      CommandStatement cmdStmt =  new CommandStatement(d1);
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block b = new Block();
      b.addStatement(cmdStmt);
      b.addStatement(assigStmt);
      b.addStatement(errStmt);
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

    public void testIfStatement1() {
    // construct If block
        Delete d1 = new Delete();
        d1.setGroup(new GroupSymbol("g")); //$NON-NLS-1$
      CommandStatement cmdStmt =  new CommandStatement(d1);
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block ifblock = new Block();
      ifblock.addStatement(cmdStmt);
      ifblock.addStatement(assigStmt);
      ifblock.addStatement(errStmt);
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

    public void testIfStatement3() {
    // construct If block
        Delete d1 = new Delete();
        d1.setGroup(new GroupSymbol("g")); //$NON-NLS-1$
      CommandStatement cmdStmt =  new CommandStatement(d1);
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block ifblock = new Block();
      ifblock.addStatement(cmdStmt);
      ifblock.addStatement(assigStmt);
      ifblock.addStatement(errStmt);
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

    public void testCreateUpdateProcedure1() {
        Delete d1 = new Delete();
        d1.setGroup(new GroupSymbol("g")); //$NON-NLS-1$
      CommandStatement cmdStmt =  new CommandStatement(d1);
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block b = new Block();
      b.addStatement(cmdStmt);
      b.addStatement(assigStmt);
      b.addStatement(errStmt);
View Full Code Here

Examples of org.teiid.query.sql.proc.AssignmentStatement

   
    public void testCreateUpdateProcedure2() {
        Delete d1 = new Delete();
        d1.setGroup(new GroupSymbol("g")); //$NON-NLS-1$
      CommandStatement cmdStmt =  new CommandStatement(d1);
      AssignmentStatement assigStmt =  new AssignmentStatement(new ElementSymbol("a"), new Constant(new Integer(1))); //$NON-NLS-1$
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block b = new Block();
      b.addStatement(cmdStmt);
      b.addStatement(assigStmt);
      b.addStatement(errStmt);
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.