use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.
the class TestSubstringFunctionModifier method helpTestMod.
public void helpTestMod(Expression[] args, String expectedStr) throws Exception {
Function func = // $NON-NLS-1$
LANG_FACTORY.createFunction(// $NON-NLS-1$
"substring", Arrays.asList(args), TypeFacility.RUNTIME_TYPES.STRING);
OracleExecutionFactory trans = new OracleExecutionFactory();
trans.start();
SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
sqlVisitor.append(func);
assertEquals(expectedStr, sqlVisitor.toString());
}
use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.
the class TestSybaseIQConvertModifier method helpGetString.
public String helpGetString(Expression expr) throws Exception {
SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
sqlVisitor.append(expr);
return sqlVisitor.toString();
}
use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.
the class TestDB2ConvertModifier method helpGetString.
public String helpGetString(Expression expr) throws Exception {
DB2ExecutionFactory trans = new DB2ExecutionFactory();
trans.start();
SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
sqlVisitor.append(expr);
return sqlVisitor.toString();
}
use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.
the class TestPathFunctionModifier method helpTestMod.
public void helpTestMod(Expression c, String expectedStr, String target) throws Exception {
Function func = null;
if (c != null) {
func = LANG_FACTORY.createFunction(target, Arrays.asList(c), String.class);
} else {
func = LANG_FACTORY.createFunction(target, Collections.EMPTY_LIST, String.class);
}
ModeShapeExecutionFactory trans = new ModeShapeExecutionFactory();
trans.start();
SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
sqlVisitor.append(func);
assertEquals(expectedStr, sqlVisitor.toString());
}
use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.
the class TestNetezzaConvertModifier method helpGetString.
public String helpGetString(Expression expr) throws Exception {
NetezzaExecutionFactory trans = new NetezzaExecutionFactory();
trans.start();
SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
sqlVisitor.append(expr);
return sqlVisitor.toString();
}
Aggregations