use of org.teiid.query.sql.symbol.Constant in project teiid by teiid.
the class TestAssignmentStatement method testGetExpression.
public void testGetExpression() {
AssignmentStatement s1 = sample1();
// $NON-NLS-1$ //$NON-NLS-2$
assertEquals("Didn't get the same parts ", s1.getExpression(), new Constant("1"));
}
use of org.teiid.query.sql.symbol.Constant in project teiid by teiid.
the class TestFunction method testFunction1.
// ################################## TEST HELPERS ################################
// ################################## ACTUAL TESTS ################################
public void testFunction1() {
// $NON-NLS-1$ //$NON-NLS-2$
Function f1 = new Function("f1", new Expression[] { new Constant("xyz") });
// $NON-NLS-1$ //$NON-NLS-2$
Function f2 = new Function("f1", new Expression[] { new Constant("xyz") });
UnitTestUtil.helpTestEquivalence(0, f1, f2);
}
use of org.teiid.query.sql.symbol.Constant in project teiid by teiid.
the class TestFunction method testFunction6.
public void testFunction6() {
// $NON-NLS-1$ //$NON-NLS-2$
Function f1 = new Function("f1", new Expression[] { new Constant("xyz") });
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Function f2 = new Function("f1", new Expression[] { new Constant("xyz"), new Constant("xyz") });
UnitTestUtil.helpTestEquivalence(1, f1, f2);
}
use of org.teiid.query.sql.symbol.Constant in project teiid by teiid.
the class TestFunction method testFunction5.
public void testFunction5() {
// $NON-NLS-1$
Function f1 = new Function("f1", new Expression[] { null });
// $NON-NLS-1$ //$NON-NLS-2$
Function f2 = new Function("f1", new Expression[] { new Constant("xyz") });
UnitTestUtil.helpTestEquivalence(1, f1, f2);
}
use of org.teiid.query.sql.symbol.Constant in project teiid by teiid.
the class TestDynamicCommand method testClone1.
public void testClone1() {
List symbols = new ArrayList();
// $NON-NLS-1$
ElementSymbol a1 = new ElementSymbol("a1");
a1.setType(DataTypeManager.DefaultDataClasses.STRING);
symbols.add(a1);
DynamicCommand sqlCmd = new DynamicCommand();
// $NON-NLS-1$
Expression sql = new Constant("SELECT a1 FROM g WHERE a2 = 5");
sqlCmd.setSql(sql);
sqlCmd.setAsColumns(symbols);
sqlCmd.setAsClauseSet(true);
// $NON-NLS-1$
sqlCmd.setIntoGroup(new GroupSymbol("#g"));
UnitTestUtil.helpTestEquivalence(0, sqlCmd, sqlCmd.clone());
}
Aggregations