use of org.teiid.query.sql.symbol.MultipleElementSymbol in project teiid by teiid.
the class TestStaticSymbolMappingVisitor method testVisitSelect2.
public void testVisitSelect2() {
Select select = new Select();
MultipleElementSymbol all = new MultipleElementSymbol();
select.addSymbol(all);
helpTest(select, getSymbolMap());
}
use of org.teiid.query.sql.symbol.MultipleElementSymbol in project teiid by teiid.
the class TestStaticSymbolMappingVisitor method testVisitAllSymbol.
public void testVisitAllSymbol() {
MultipleElementSymbol as = new MultipleElementSymbol();
ArrayList elements = new ArrayList();
elements.add(exampleElement(true, 0));
elements.add(exampleElement(true, 1));
as.setElementSymbols(elements);
helpTest(as, getSymbolMap());
}
use of org.teiid.query.sql.symbol.MultipleElementSymbol in project teiid by teiid.
the class TestStaticSymbolMappingVisitor method testVisitSelect4.
public void testVisitSelect4() {
Select select = new Select();
select.addSymbol(new ExpressionSymbol("x", // $NON-NLS-1$ //$NON-NLS-2$
new Function("length", new Expression[] { exampleElement(true, 0) })));
// $NON-NLS-1$
select.addSymbol(new MultipleElementSymbol("abc.*"));
select.addSymbol(exampleElement(true, 1));
helpTest(select, getSymbolMap());
}
use of org.teiid.query.sql.symbol.MultipleElementSymbol in project teiid by teiid.
the class TestSelect method sample1.
// ################################## TEST HELPERS ################################
public static final Select sample1() {
List symbols = new ArrayList();
// $NON-NLS-1$
symbols.add(new ElementSymbol("a"));
// $NON-NLS-1$
symbols.add(new ElementSymbol("b"));
Select select = new Select();
MultipleElementSymbol all = new MultipleElementSymbol();
all.setElementSymbols(symbols);
select.addSymbol(all);
return select;
}
use of org.teiid.query.sql.symbol.MultipleElementSymbol in project teiid by teiid.
the class TestSelect method testGetProjectedWithStar.
public void testGetProjectedWithStar() {
List symbols = new ArrayList();
// $NON-NLS-1$
symbols.add(new ElementSymbol("a"));
// $NON-NLS-1$
symbols.add(new ElementSymbol("b"));
Select select = new Select();
MultipleElementSymbol all = new MultipleElementSymbol();
all.setElementSymbols(symbols);
select.addSymbol(all);
List projectedSymbols = select.getProjectedSymbols();
// $NON-NLS-1$
assertEquals("Did not get correct list for select *: ", symbols, projectedSymbols);
}
Aggregations