public static Select example(boolean distinct) throws Exception { return TstLanguageBridgeFactory.factory.translate(helpExample(distinct)); }
public static SubqueryFromClause helpExample() { return new SubqueryFromClause("xyz", TestQueryImpl.helpExample(true)); //$NON-NLS-1$ }
public static SubqueryCompareCriteria helpExample() { ElementSymbol element = TestElementImpl.helpExample("g1", "e1"); //$NON-NLS-1$ //$NON-NLS-2$ Query query = TestQueryImpl.helpExample(true); SubqueryCompareCriteria scc = new SubqueryCompareCriteria(element, query, AbstractCompareCriteria.GT, SubqueryCompareCriteria.ANY); return scc; }
public static ExistsCriteria helpExample(boolean negated) { ExistsCriteria crit = new ExistsCriteria(TestQueryImpl.helpExample(true)); crit.setNegated(negated); return crit; }
public static SubquerySetCriteria helpExample() { ElementSymbol element = TestElementImpl.helpExample("g1", "e1"); //$NON-NLS-1$ //$NON-NLS-2$ Query query = TestQueryImpl.helpExample(true); SubquerySetCriteria ssc = new SubquerySetCriteria(element, query); ssc.setNegated(true); return ssc; }
public static org.teiid.query.sql.lang.SetQuery helpExampleSetQuery() { org.teiid.query.sql.lang.SetQuery setQuery = new org.teiid.query.sql.lang.SetQuery(Operation.UNION); setQuery.setAll(false); setQuery.setLeftQuery(TestQueryImpl.helpExample(true)); setQuery.setRightQuery(TestQueryImpl.helpExample(true)); setQuery.setOrderBy(TestOrderByImpl.helpExample()); return setQuery; }
public static org.teiid.query.sql.symbol.ScalarSubquery helpExample() { Query query = TestQueryImpl.helpExample(true); org.teiid.query.sql.symbol.ScalarSubquery ss = new org.teiid.query.sql.symbol.ScalarSubquery(query); ss.setType(((Expression)query.getProjectedSymbols().get(0)).getType()); return ss; }
public void testGetType() throws Exception { Select query = TstLanguageBridgeFactory.factory.translate(TestQueryImpl.helpExample(true)); Class<?> firstSymbolType = query.getDerivedColumns().get(0).getExpression().getType(); assertEquals("Got incorrect type", firstSymbolType, example().getType()); //$NON-NLS-1$ }