Package org.teiid.query.sql.symbol

Examples of org.teiid.query.sql.symbol.AllInGroupSymbol


        return queryNode;
    }   
   
    static Query wrapQuery(FromClause fromClause, String groupName) {
        Select select = new Select();
        select.addSymbol(new AllInGroupSymbol(groupName + ".*")); //$NON-NLS-1$
        Query query = new Query();
        query.setSelect(select);
        From from = new From();
        from.addClause(fromClause);
        query.setFrom(from);       
View Full Code Here


      Query procQuery = new Query();
      From from = new From();
      from.addClause(new SubqueryFromClause("X", storedProcedureCommand)); //$NON-NLS-1$
      procQuery.setFrom(from);
      Select select = new Select();
      select.addSymbol(new AllInGroupSymbol("X.*")); //$NON-NLS-1$
      procQuery.setSelect(select);
     
      List<String> accessPatternElementNames = new LinkedList<String>();
     
      int paramIndex = 1;
View Full Code Here

                Object selectSymbol = i.next();
                if (selectSymbol instanceof AllSymbol){
                    isBeingSelected = true;
                    break;
                } else if (selectSymbol instanceof AllInGroupSymbol){
                    AllInGroupSymbol aigSymbol = (AllInGroupSymbol)selectSymbol;
                    if (aigSymbol.getName().equalsIgnoreCase(groupDotStarName)){
                        isBeingSelected = true;
                        break;
                    }
                }
            }
View Full Code Here

    From from = new From();
    from.addGroup(g);
    from.addGroup(h);

    Select select = new Select();
    AllInGroupSymbol myG = new AllInGroupSymbol("myG.*"); //$NON-NLS-1$
    select.addSymbol(myG);
    select.addSymbol(new ElementSymbol("myH.b")); //$NON-NLS-1$

    Query query = new Query();
    query.setSelect(select);
View Full Code Here

    From from = new From();
    from.addGroup(g);
    from.addGroup(h);

    Select select = new Select();
    AllInGroupSymbol myG = new AllInGroupSymbol("myG.*"); //$NON-NLS-1$
    select.addSymbol(myG);
    select.addSymbol(new ElementSymbol("myH.b")); //$NON-NLS-1$

    Query query = new Query();
    query.setSelect(select);
View Full Code Here

 
  public void testVisitSelect4() {
    Select select = new Select();
    select.addSymbol( new ExpressionSymbol(
      "x", new Function("length", new Expression[] {exampleElement(true, 0)})) );    //$NON-NLS-1$ //$NON-NLS-2$
    select.addSymbol( new AllInGroupSymbol("abc.*") ); //$NON-NLS-1$
    select.addSymbol( exampleElement(true, 1) );
    helpTest(select,getSymbolMap());
  }
View Full Code Here

     as.setElementSymbols(elements);
     helpTest(as, getSymbolMap());
   }
  
   public void testVisitAllInGroupSymbol() {
     AllInGroupSymbol aigs = new AllInGroupSymbol("OLDG0.*"); //$NON-NLS-1$
     ArrayList elements = new ArrayList();
     elements.add(exampleElement(true, 0));   
     elements.add(exampleElement(true, 1));        
     aigs.setElementSymbols(elements);
     helpTest(aigs, getSymbolMap());      
   }
View Full Code Here

       Function f2 = new Function("length", new Expression[] { f1 }); //$NON-NLS-1$
    helpTest(f2, getSymbolMap());      
   }  

   public void testMapAllInGroupSymbolName() {
     AllInGroupSymbol aigs = new AllInGroupSymbol("OLDG0.*"); //$NON-NLS-1$
     ArrayList elements = new ArrayList();
     elements.add(exampleElement(true, 0));   
     elements.add(exampleElement(true, 1));        
     aigs.setElementSymbols(elements);
    
        // Run symbol mapper
        StaticSymbolMappingVisitor visitor = new StaticSymbolMappingVisitor(getSymbolMap());
        DeepPreOrderNavigator.doVisit(aigs, visitor);

    // Check name of all in group symbol
    assertEquals("AllInGroupSymbol name did not get mapped correctly: ", "NEWG0.*", aigs.getName()); //$NON-NLS-1$ //$NON-NLS-2$
   }
View Full Code Here

  public void testAllSymbol() {
    helpTest(new AllSymbol(), "*");     //$NON-NLS-1$
  }
 
  public void testAllInGroupSymbol() {
      helpTest(new AllInGroupSymbol("m.g.*"), "m.g.*"); //$NON-NLS-1$ //$NON-NLS-2$
  }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.symbol.AllInGroupSymbol

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.