Package org.teiid.query.optimizer.capabilities

Examples of org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder


     */
    @Test public void testScalarFunction2b() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
        caps.setFunctionSupport("rand", false); //$NON-NLS-1$
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("rand() = '1.0'", modelID, metadata, capFinder, false, false); //$NON-NLS-1$
    }
View Full Code Here


   
    @Test public void testIsNull1() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_ISNULL, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 IS NULL", modelID, metadata, capFinder, true, false); //$NON-NLS-1$
    }
View Full Code Here

    @Test public void testIsNull2() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_ISNULL, false);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 IS NULL", modelID, metadata, capFinder, false, false); //$NON-NLS-1$
    }
View Full Code Here

    @Test public void testIsNull3() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
       
        helpTestVisitor("pm1.g1.e1 IS NULL", modelID, metadata, capFinder, true, false); //$NON-NLS-1$
    }
View Full Code Here

        FakeMetadataFacade metadata = FakeMetadataFactory.example1();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
        FakeMetadataObject e1 = metadata.getStore().findObject("pm1.g1.e1", FakeMetadataObject.ELEMENT); //$NON-NLS-1$
        e1.putProperty(FakeMetadataObject.Props.SEARCHABLE_COMPARE, Boolean.FALSE);
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_ISNULL, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 IS NULL", modelID, metadata, capFinder, true, false); //$NON-NLS-1$
    }
View Full Code Here

   
    @Test public void testIsNull6() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_ISNULL, true);
        caps.setCapabilitySupport(Capability.CRITERIA_NOT, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 IS NOT NULL", modelID, metadata, capFinder, true, false); //$NON-NLS-1$
    }
View Full Code Here

   
    @Test public void testIsNull6fails() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_ISNULL, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 IS NOT NULL", modelID, metadata, capFinder, false, false); //$NON-NLS-1$
    }
View Full Code Here

    // has all capabilities
    @Test public void testMatchCriteriaSuccess() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_LIKE, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 LIKE 'x'", modelID, metadata, capFinder, true, false);         //$NON-NLS-1$
    }
View Full Code Here

    @Test public void testMatchCriteriaSuccess2() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_LIKE, true);
        caps.setCapabilitySupport(Capability.CRITERIA_LIKE_ESCAPE, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 LIKE 'x' ESCAPE '#'", modelID, metadata, capFinder, true, false);         //$NON-NLS-1$
    }
View Full Code Here

    // Test for NOT LIKE
    @Test public void testMatchCriteriaSuccess3() {
        FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
        Object modelID = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
       
        FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
        BasicSourceCapabilities caps = new BasicSourceCapabilities();
        caps.setCapabilitySupport(Capability.CRITERIA_LIKE, true);
        caps.setCapabilitySupport(Capability.CRITERIA_NOT, true);
        capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
       
        helpTestVisitor("pm1.g1.e1 NOT LIKE 'x'", modelID, metadata, capFinder, true, false);         //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder

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.