use of org.teiid.language.QueryExpression in project teiid by teiid.
the class TestAsynch method oneTimeSetup.
@BeforeClass
public static void oneTimeSetup() throws Exception {
server = new FakeServer(true);
ModelMetaData mmd = new ModelMetaData();
mmd.setName("v");
mmd.setModelType(Type.PHYSICAL);
mmd.setSchemaSourceType("ddl");
mmd.addSourceMapping("z", "z", null);
mmd.setSchemaText("create view test (col integer) as select 1; create foreign table someTable (col integer);");
ef = new HardCodedExecutionFactory() {
@Override
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws TranslatorException {
partIds.add(executionContext.getPartIdentifier());
return super.createResultSetExecution(command, executionContext, metadata, connection);
}
};
server.addTranslator("z", ef);
server.deployVDB("x", mmd);
}
Aggregations