use of org.teiid.language.Literal in project teiid by teiid.
the class TestDayWeekQuarterFunctionModifier method test2.
public void test2() throws Exception {
Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
helpTestMod(arg1, SourceSystemFunctions.DAYOFYEAR, // $NON-NLS-1$
"to_number(TO_CHAR({d '2004-01-21'}, 'DDD'))");
}
use of org.teiid.language.Literal in project teiid by teiid.
the class TestDayWeekQuarterFunctionModifier method test10.
public void test10() throws Exception {
Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
helpTestMod(arg1, SourceSystemFunctions.QUARTER, // $NON-NLS-1$
"to_number(TO_CHAR({d '2004-01-21'}, 'Q'))");
}
use of org.teiid.language.Literal in project teiid by teiid.
the class TestLeftOrRightFunctionModifier method test1.
public void test1() throws Exception {
// $NON-NLS-1$
Literal arg1 = LANG_FACTORY.createLiteral("1234214", String.class);
Literal count = LANG_FACTORY.createLiteral(new Integer(11), Integer.class);
helpTestMod(// $NON-NLS-1$
arg1, // $NON-NLS-1$
count, // $NON-NLS-1$
"left", // $NON-NLS-1$
"substr('1234214', 1, 11)");
}
use of org.teiid.language.Literal in project teiid by teiid.
the class TestMonthOrDayNameFunctionModifier method test4.
public void test4() throws Exception {
Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
helpTestMod(// $NON-NLS-1$
arg1, // $NON-NLS-1$
"Day", // $NON-NLS-1$
"rtrim(TO_CHAR({d '2004-01-21'}, 'Day'))");
}
use of org.teiid.language.Literal in project teiid by teiid.
the class TestMonthOrDayNameFunctionModifier method test2.
public void test2() throws Exception {
Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
helpTestMod(// $NON-NLS-1$
arg1, // $NON-NLS-1$
"Month", // $NON-NLS-1$
"rtrim(TO_CHAR({d '2004-01-21'}, 'Month'))");
}
Aggregations