Search in sources :

Example 6 with StoredProcedureInfo

use of org.teiid.query.metadata.StoredProcedureInfo in project teiid by teiid.

the class FakeDataStore method sampleData1.

public static void sampleData1(FakeDataManager dataMgr, QueryMetadataInterface metadata) throws TeiidException {
    addTable("pm1.g1", dataMgr, metadata);
    addTable("pm1.g2", dataMgr, metadata);
    addTable("pm1.g3", dataMgr, metadata);
    addTable("pm2.g1", dataMgr, metadata);
    addTable("pm2.g2", dataMgr, metadata);
    addTable("pm2.g3", dataMgr, metadata);
    // addTable("tm1.g1", dataMgr, metadata);
    // stored procedure pm1.sp1
    // $NON-NLS-1$
    StoredProcedureInfo procInfo = metadata.getStoredProcedureInfoForProcedure("pm1.sp1");
    dataMgr.registerProcTuples(procInfo.getProcedureCallableName().toUpperCase(), new List[] { // $NON-NLS-1$
    Arrays.asList(new Object[] { "a", new Integer(0) }), Arrays.asList(new Object[] { null, new Integer(1) }), // $NON-NLS-1$
    Arrays.asList(new Object[] { "a", new Integer(3) }), // $NON-NLS-1$
    Arrays.asList(new Object[] { "c", new Integer(1) }), // $NON-NLS-1$
    Arrays.asList(new Object[] { "b", new Integer(2) }), // $NON-NLS-1$
    Arrays.asList(new Object[] { "a", new Integer(0) }) });
}
Also used : StoredProcedureInfo(org.teiid.query.metadata.StoredProcedureInfo)

Aggregations

StoredProcedureInfo (org.teiid.query.metadata.StoredProcedureInfo)6 ArrayList (java.util.ArrayList)2 List (java.util.List)2 QueryMetadataException (org.teiid.api.exception.query.QueryMetadataException)2 QueryResolverException (org.teiid.api.exception.query.QueryResolverException)2 SPParameter (org.teiid.query.sql.lang.SPParameter)2 GroupSymbol (org.teiid.query.sql.symbol.GroupSymbol)2 HashSet (java.util.HashSet)1 TreeMap (java.util.TreeMap)1 QueryValidatorException (org.teiid.api.exception.query.QueryValidatorException)1 TeiidComponentException (org.teiid.core.TeiidComponentException)1 QueryNode (org.teiid.query.mapping.relational.QueryNode)1 TempMetadataAdapter (org.teiid.query.metadata.TempMetadataAdapter)1 TempMetadataID (org.teiid.query.metadata.TempMetadataID)1 TempMetadataStore (org.teiid.query.metadata.TempMetadataStore)1 LanguageObject (org.teiid.query.sql.LanguageObject)1 GroupContext (org.teiid.query.sql.lang.GroupContext)1 StoredProcedure (org.teiid.query.sql.lang.StoredProcedure)1 CreateProcedureCommand (org.teiid.query.sql.proc.CreateProcedureCommand)1 TriggerAction (org.teiid.query.sql.proc.TriggerAction)1