use of org.teiid.query.sql.lang.Select 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.lang.Select in project teiid by teiid.
the class TestSelect method testSelfEquivalence.
public void testSelfEquivalence() {
Select s1 = sample1();
int equals = 0;
UnitTestUtil.helpTestEquivalence(equals, s1, s1);
}
use of org.teiid.query.sql.lang.Select in project teiid by teiid.
the class TestSelect method testEquivalence.
public void testEquivalence() {
Select s1 = sample1();
Select s1a = sample1();
int equals = 0;
UnitTestUtil.helpTestEquivalence(equals, s1, s1a);
}
use of org.teiid.query.sql.lang.Select in project teiid by teiid.
the class TestSelect method sample2.
public static final Select sample2() {
Select select = new Select();
// $NON-NLS-1$
select.addSymbol(new ElementSymbol("a"));
// $NON-NLS-1$
select.addSymbol(new ElementSymbol("b"));
// $NON-NLS-1$
select.addSymbol(new ElementSymbol("c"));
// $NON-NLS-1$ //$NON-NLS-2$
select.addSymbol(new AliasSymbol("Z", new ElementSymbol("ZZ 9 Plural Z Alpha")));
return select;
}
use of org.teiid.query.sql.lang.Select 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