Package org.teiid.query.metadata

Examples of org.teiid.query.metadata.QueryMetadataInterface


        caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
        caps.setFunctionSupport("convert", true); //$NON-NLS-1$
        capFinder.addCapabilities("BQT1", caps); //$NON-NLS-1$

        // Add join capability to pm1
        QueryMetadataInterface metadata = FakeMetadataFactory.exampleBQTCached();
        
        ProcessorPlan plan = helpPlan(
            "SELECT intkey from bqt1.smalla WHERE stringkey = convert(objectvalue, string)"//$NON-NLS-1$
            metadata,
            null, capFinder,
View Full Code Here


        caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
        caps.setFunctionSupport("convert", true); //$NON-NLS-1$
        capFinder.addCapabilities("LOB", caps); //$NON-NLS-1$

        // Add join capability to pm1
        QueryMetadataInterface metadata = FakeMetadataFactory.exampleBQTCached();
        
        ProcessorPlan plan = helpPlan(
            "SELECT ClobValue from LOB.LobTbl WHERE convert(ClobValue, string) = ?"//$NON-NLS-1$
            metadata,
            null, capFinder,
View Full Code Here

    // =====================================================================
    // TESTS
    // =====================================================================
   
    @Test public void testEstimateCostOfCriteria() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm2.g3.e1 = '3' or pm2.g3.e2 = 2"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, NewCalculateCostUtil.UNKNOWN_VALUE, NewCalculateCostUtil.UNKNOWN_VALUE, metadata);
    }
View Full Code Here

       
        helpTestEstimateCost(critString, NewCalculateCostUtil.UNKNOWN_VALUE, NewCalculateCostUtil.UNKNOWN_VALUE, metadata);
    }

    @Test public void testEstimateCostOfCompareCriteria() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm1.g1.e1 = '3'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, NewCalculateCostUtil.UNKNOWN_VALUE, 1, metadata);   
   
View Full Code Here

       
        helpTestEstimateCost(critString, NewCalculateCostUtil.UNKNOWN_VALUE, 1, metadata);   
   
   
    @Test public void testEstimateCostOfCompareCriteria1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm1.g1.e1 < '3'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, NewCalculateCostUtil.UNKNOWN_VALUE, NewCalculateCostUtil.UNKNOWN_VALUE, metadata);   
    }
View Full Code Here

    /**
     * usesKey = false
     * NOT = false
     */
    @Test public void testEstimateCostOfMatchCriteria1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm2.g3.e1 LIKE '#%'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 300, 100, metadata);
    }
View Full Code Here

    /**
     * usesKey = false
     * NOT = true
     */
    @Test public void testEstimateCostOfMatchCriteria2() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm2.g3.e1 NOT LIKE '#_'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 300, 233, metadata);
    }
View Full Code Here

    /**
     * usesKey = true
     * NOT = false
     */
    @Test public void testEstimateCostOfMatchCriteria3() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm1.g1.e1 LIKE '#_'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 300, 50, metadata);
    }
View Full Code Here

    /**
     * usesKey = true
     * NOT = true
     */
    @Test public void testEstimateCostOfMatchCriteria4() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm1.g1.e1 NOT LIKE '#_'"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 300, 249, metadata);
    }
View Full Code Here

    /**
     * usesKey = false
     * NOT = false
     */
    @Test public void testEstimateCostOfIsNullCriteria1() throws Exception {
        QueryMetadataInterface metadata = FakeMetadataFactory.example4();
        String critString = "pm2.g3.e1 IS NULL"; //$NON-NLS-1$
       
        helpTestEstimateCost(critString, 300, 33, metadata);
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.metadata.QueryMetadataInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.