Search in sources :

Example 16 with SQLConversionVisitor

use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.

the class TestNetezzaTranslatorDatetimeConversion method helpGetString.

public String helpGetString(Expression expr) throws Exception {
    SQLConversionVisitor sqlVisitor = TRANSLATOR.getSQLConversionVisitor();
    sqlVisitor.append(expr);
    return sqlVisitor.toString();
}
Also used : SQLConversionVisitor(org.teiid.translator.jdbc.SQLConversionVisitor)

Example 17 with SQLConversionVisitor

use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.

the class TestNetezzaTranslatorTypeMapping method helpGetString.

public String helpGetString(Expression expr) throws Exception {
    SQLConversionVisitor sqlVisitor = TRANSLATOR.getSQLConversionVisitor();
    sqlVisitor.append(expr);
    return sqlVisitor.toString();
}
Also used : SQLConversionVisitor(org.teiid.translator.jdbc.SQLConversionVisitor)

Example 18 with SQLConversionVisitor

use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.

the class TestSybaseConvertModifier method helpGetString.

public String helpGetString(Expression expr) throws Exception {
    SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
    sqlVisitor.append(expr);
    return sqlVisitor.toString();
}
Also used : SQLConversionVisitor(org.teiid.translator.jdbc.SQLConversionVisitor)

Example 19 with SQLConversionVisitor

use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.

the class TestDayWeekQuarterFunctionModifier method helpTestMod.

public void helpTestMod(Literal c, String format, String expectedStr) throws Exception {
    Function func = LANG_FACTORY.createFunction(format, Arrays.asList(c), String.class);
    OracleExecutionFactory trans = new OracleExecutionFactory();
    trans.start();
    SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
    sqlVisitor.append(func);
    assertEquals(expectedStr, sqlVisitor.toString());
}
Also used : Function(org.teiid.language.Function) SQLConversionVisitor(org.teiid.translator.jdbc.SQLConversionVisitor)

Example 20 with SQLConversionVisitor

use of org.teiid.translator.jdbc.SQLConversionVisitor in project teiid by teiid.

the class TestOracleConvertModifier method helpGetString.

public String helpGetString(Expression expr) throws Exception {
    OracleExecutionFactory trans = new OracleExecutionFactory();
    trans.start();
    SQLConversionVisitor sqlVisitor = TRANSLATOR.getSQLConversionVisitor();
    sqlVisitor.append(expr);
    return sqlVisitor.toString();
}
Also used : SQLConversionVisitor(org.teiid.translator.jdbc.SQLConversionVisitor)

Aggregations

SQLConversionVisitor (org.teiid.translator.jdbc.SQLConversionVisitor)31 Test (org.junit.Test)10 CommandBuilder (org.teiid.cdk.CommandBuilder)9 Command (org.teiid.language.Command)9 Function (org.teiid.language.Function)9 Select (org.teiid.language.Select)3 TranslatedCommand (org.teiid.translator.jdbc.TranslatedCommand)1 PhoenixExecutionFactory (org.teiid.translator.phoenix.PhoenixExecutionFactory)1