Package org.teiid.query.sql.proc

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


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

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


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

    List elmnts = new ArrayList(3);
    elmnts.add(sy1);
    elmnts.add(sy2);
    elmnts.add(sy3);       
    CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);
    helpTest(new HasCriteria(cs), "HAS LIKE CRITERIA ON (x, y, z)"); //$NON-NLS-1$
    }
View Full Code Here

        List elmnts = new ArrayList(3);
        elmnts.add(sy1);
        elmnts.add(sy2);
        elmnts.add(sy3);               
        CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);
        helpTest(new HasCriteria(cs), "HAS LIKE CRITERIA ON (x, y, z)"); //$NON-NLS-1$
    }
View Full Code Here

        List elmnts = new ArrayList(3);
        elmnts.add(sy1);
        elmnts.add(sy2);
        elmnts.add(sy3);               
        CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.BETWEEN, elmnts);
        helpTest(new HasCriteria(cs), "HAS BETWEEN CRITERIA ON (x, y, z)"); //$NON-NLS-1$
    }
View Full Code Here

    // construct If criteria     
    ElementSymbol sy1 = new ElementSymbol("x"); //$NON-NLS-1$
    List elmnts = new ArrayList(1);
    elmnts.add(sy1);
    CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);     
      Criteria crit = new HasCriteria(cs);     
      IfStatement ifStmt = new IfStatement(crit, ifblock);     
     
      // other statements
      RaiseErrorStatement errStmt =  new RaiseErrorStatement(new Constant("My Error")); //$NON-NLS-1$
      Block b = new Block();
View Full Code Here

    // construct If criteria     
    ElementSymbol sy1 = new ElementSymbol("x"); //$NON-NLS-1$
    List elmnts = new ArrayList(1);
    elmnts.add(sy1);
    CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);     
      Criteria crit = new HasCriteria(cs);
     
      IfStatement ifStmt = new IfStatement(crit, ifblock);
    helpTest(ifStmt, "IF(HAS LIKE CRITERIA ON (x))\nBEGIN\nDELETE FROM g;\na = 1;\nERROR 'My Error';\nEND"); //$NON-NLS-1$
    }
View Full Code Here

    // construct If criteria     
    ElementSymbol sy1 = new ElementSymbol("x"); //$NON-NLS-1$
    List elmnts = new ArrayList(1);
    elmnts.add(sy1);
    CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);     
      Criteria crit = new HasCriteria(cs);
     
      IfStatement ifStmt = new IfStatement(crit, ifblock);
    helpTest(ifStmt, "IF(HAS LIKE CRITERIA ON (x))\nBEGIN\nDELETE FROM g;\nEND"); //$NON-NLS-1$
    }
View Full Code Here

    // construct If criteria     
    ElementSymbol sy1 = new ElementSymbol("x"); //$NON-NLS-1$
    List elmnts = new ArrayList(1);
    elmnts.add(sy1);
    CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);     
      Criteria crit = new HasCriteria(cs);
     
      Block elseblock = new Block();
      elseblock.addStatement(cmdStmt);
     
      IfStatement ifStmt = new IfStatement(crit, ifblock, elseblock);
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.proc.HasCriteria

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.