Package org.apache.chemistry.opencmis.server.support.query

Examples of org.apache.chemistry.opencmis.server.support.query.CmisQueryWalker


    }

    public void simpleSelectTest1() {
        String statement = "SELECT SCORE() FROM cmis:document";

        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        assertTrue(selects.get(0) instanceof FunctionReference);
View Full Code Here


    }

    @Test
    public void simpleSelectTest2() {
        String statement = "SELECT abc FROM cmis:document";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
View Full Code Here

    }

    @Test
    public void simpleSelectTest3() {
        String statement = "SELECT t1.abc FROM cmis:document";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
View Full Code Here

    }

    @Test
    public void simpleSelectTest4() {
        String statement = "SELECT * FROM cmis:document";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
View Full Code Here

    }

    @Test
    public void simpleSelectTest5() {
        String statement = "SELECT t1.* FROM cmis:document";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
View Full Code Here

    }

    @Test
    public void simpleSelectTest6() {
        String statement = "SELECT t2.aaa myalias FROM cmis:document";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        List<CmisSelector> selects = queryObj.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
View Full Code Here

    @Test
    public void simpleSelectTest7() {
        // error processing
        String statement = "SELECTXXX t2.aaa myalias FROM cmis:document WHERE a < t1";
        try {
            CmisQueryWalker walker = traverseStatement(statement);
            fail("Walking of statement should with RecognitionException but succeeded");
        } catch (Exception e) {
            assertTrue(e instanceof CmisInvalidArgumentException);
        }
    }
View Full Code Here

    @Test
    public void simpleFromTest1() {
        String statement = "SELECT * FROM MyType MyAlias";

        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        Map<String,String> types = queryObj.getTypes();
        assertTrue(1 == types.size());

View Full Code Here

    }

    @Test
    public void simpleFromTest2() {
        String statement = "SELECT * FROM MyType";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        Map<String,String> types = queryObj.getTypes();
        assertTrue(1 == types.size());

View Full Code Here

    }

    @Test
    public void simpleFromTest3() {
        String statement = "SELECT t2.aaa FROM MyType abc123";
        CmisQueryWalker walker = traverseStatementAndCatchExc(statement);
        assertNotNull(walker);

        Map<String,String> types = queryObj.getTypes();
        assertTrue(1 == types.size());
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.server.support.query.CmisQueryWalker

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.