Package org.teiid.query.sql.lang

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


        Select select = new Select();
        ElementSymbol a = new ElementSymbol("a")//$NON-NLS-1$
        select.addSymbol(a);

        Option option = new Option();
        option.addNotDependentGroup("a.b.c"); //$NON-NLS-1$

        Query query = new Query();
        query.setSelect(select);
        query.setFrom(from);
        query.setOption(option);
View Full Code Here


        Select select = new Select();
        ElementSymbol a = new ElementSymbol("a")//$NON-NLS-1$
        select.addSymbol(a);

        Option option = new Option();
        option.addNotDependentGroup("a.b.c"); //$NON-NLS-1$
        option.addNotDependentGroup("d.e.f"); //$NON-NLS-1$

        Query query = new Query();
        query.setSelect(select);
        query.setFrom(from);
        query.setOption(option);
View Full Code Here

        Select select = new Select();
        ElementSymbol a = new ElementSymbol("a")//$NON-NLS-1$
        select.addSymbol(a);

        Option option = new Option();
        option.addNotDependentGroup("a.b.c"); //$NON-NLS-1$
        option.addNotDependentGroup("d.e.f"); //$NON-NLS-1$
        option.addNotDependentGroup("x.y.z"); //$NON-NLS-1$

        Query query = new Query();
        query.setSelect(select);
        query.setFrom(from);
        query.setOption(option);
View Full Code Here

        ElementSymbol x = new ElementSymbol("a.x", true); //$NON-NLS-1$
        ElementSymbol y = new ElementSymbol("b.y", true); //$NON-NLS-1$
       
        From from = new From(Arrays.asList(new UnaryFromClause(a), new UnaryFromClause(b)));
       
        Option option = new Option();
        option.addDependentGroup("a"); //$NON-NLS-1$
        option.addNotDependentGroup("b"); //$NON-NLS-1$
       
        Select select = new Select(Arrays.asList(new Object[] {x, y}));
       
        Criteria criteria = new CompareCriteria(x, CompareCriteria.EQ, y);
        Query query = new Query(select, from, criteria, null, null, null, option);
View Full Code Here

    //construct a query with a no cache hint
    //note that it's safe to use the stringified form of the parameters because
    //it's not possible to use xml/clob/blob/object
    CacheHint hint = proc.getCacheHint();
    proc.setCacheHint(null);
    Option option = new Option();
    option.setNoCache(true);
    option.addNoCacheGroup(fullName);
    proc.setOption(option);
    Determinism determinismLevel = context.resetDeterminismLevel();
    QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(proc.toString(), fullName.toUpperCase(), context);
    qp.setNonBlocking(true);
    qp.getContext().setDataObjects(null);
View Full Code Here

    }   
   
    static boolean stagePlannedQuery(MappingSourceNode sourceNode, XMLPlannerEnvironment planEnv)
        throws QueryPlannerException, QueryMetadataException, TeiidComponentException, QueryResolverException {
   
        Option option = planEnv.xmlCommand.getOption();
       
        // make sure we do not plan staging table for root mapping class.
        if (sourceNode.isRootSourceNode()) {
            return false;
        }
View Full Code Here

        return plan;
    }
 
  public PlanNode generatePlan(Command cmd) throws TeiidComponentException, TeiidProcessingException {
    //cascade the option clause nocache
    Option savedOption = option;
    option = cmd.getOption();
        if (option == null) {
          if (savedOption != null) {
            option = savedOption;
          }
        } else if (savedOption != null && savedOption.isNoCache()) { //merge no cache settings
        if (savedOption.getNoCacheGroups() == null || savedOption.getNoCacheGroups().isEmpty()) {
          if (option.getNoCacheGroups() != null) {
            option.getNoCacheGroups().clear(); // full no cache
          }
        } else if (option.getNoCacheGroups() != null && !option.getNoCacheGroups().isEmpty()) {
          for (String noCache : savedOption.getNoCacheGroups()) {
          option.addNoCacheGroup(noCache); // only groups
        }
        }
        option.setNoCache(true);
        }
View Full Code Here

    NotCriteria not = new NotCriteria();
    helpTest(not, "NOT (<undefined>)"); //$NON-NLS-1$
  }

  public void testOption1() {
    Option option = new Option();
    helpTest(option, "OPTION");     //$NON-NLS-1$
  }
View Full Code Here

    Option option = new Option();
    helpTest(option, "OPTION");     //$NON-NLS-1$
  }

    public void testOption5() {
        Option option = new Option();
        option.addDependentGroup("abc"); //$NON-NLS-1$
        option.addDependentGroup("def"); //$NON-NLS-1$
        option.addDependentGroup("xyz"); //$NON-NLS-1$
        helpTest(option, "OPTION MAKEDEP abc, def, xyz");     //$NON-NLS-1$
    }
View Full Code Here

        option.addDependentGroup("xyz"); //$NON-NLS-1$
        helpTest(option, "OPTION MAKEDEP abc, def, xyz");     //$NON-NLS-1$
    }

    public void testOption6() {
        Option option = new Option();
        option.addDependentGroup("abc"); //$NON-NLS-1$
        option.addDependentGroup("def"); //$NON-NLS-1$
        option.addDependentGroup("xyz"); //$NON-NLS-1$
        helpTest(option, "OPTION MAKEDEP abc, def, xyz");     //$NON-NLS-1$
    }
View Full Code Here

TOP

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

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.