Search in sources :

Example 11 with RuntimeMetadataImpl

use of org.teiid.dqp.internal.datamgr.RuntimeMetadataImpl in project teiid by teiid.

the class TestTeiidTableMarsheller method helpExecute.

private IckleConversionVisitor helpExecute(String query) throws Exception {
    MetadataFactory mf = TestProtobufMetadataProcessor.protoMatadata("tables.proto");
    // System.out.println(DDLStringVisitor.getDDLString(mf.getSchema(), null, null));
    InfinispanExecutionFactory ef = new InfinispanExecutionFactory();
    TransformationMetadata metadata = TestProtobufMetadataProcessor.getTransformationMetadata(mf, ef);
    TranslationUtility utility = new TranslationUtility(metadata);
    Select cmd = (Select) utility.parseCommand(query);
    RuntimeMetadata runtimeMetadata = new RuntimeMetadataImpl(metadata);
    IckleConversionVisitor visitor = new IckleConversionVisitor(runtimeMetadata, false);
    visitor.visitNode(cmd);
    visitor.getQuery();
    return visitor;
}
Also used : TransformationMetadata(org.teiid.query.metadata.TransformationMetadata) MetadataFactory(org.teiid.metadata.MetadataFactory) RuntimeMetadataImpl(org.teiid.dqp.internal.datamgr.RuntimeMetadataImpl) TranslationUtility(org.teiid.cdk.api.TranslationUtility) Select(org.teiid.language.Select) RuntimeMetadata(org.teiid.metadata.RuntimeMetadata)

Aggregations

RuntimeMetadataImpl (org.teiid.dqp.internal.datamgr.RuntimeMetadataImpl)11 TransformationMetadata (org.teiid.query.metadata.TransformationMetadata)11 MetadataFactory (org.teiid.metadata.MetadataFactory)8 Test (org.junit.Test)7 ExecutionContext (org.teiid.translator.ExecutionContext)7 CommandBuilder (org.teiid.cdk.CommandBuilder)6 RealMetadataFactory (org.teiid.query.unittest.RealMetadataFactory)6 Properties (java.util.Properties)5 DataSource (javax.activation.DataSource)5 Call (org.teiid.language.Call)5 WSConnection (org.teiid.translator.WSConnection)5 TranslationUtility (org.teiid.cdk.api.TranslationUtility)4 StAXSource (javax.xml.transform.stax.StAXSource)3 Procedure (org.teiid.metadata.Procedure)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 File (java.io.File)2 Command (org.teiid.language.Command)2 Select (org.teiid.language.Select)2 Blob (java.sql.Blob)1 Connection (java.sql.Connection)1