Examples of parseSelect()


Examples of org.olap4j.mdx.parser.MdxParser.parseSelect()

            ((OlapWrapper) connection).unwrap(OlapConnection.class);

        // Create a parser.
        MdxParserFactory parserFactory = olapConnection.getParserFactory();
        MdxParser parser = parserFactory.createMdxParser(olapConnection);
        SelectNode query = parser.parseSelect(
            "select {[Measures].[Unit Sales]} on columns\n"
            + "from [Sales]");
        query.getAxisList().get(0).setNonEmpty(false);

        // Create statement.
View Full Code Here

Examples of org.olap4j.mdx.parser.MdxParser.parseSelect()

        OlapConnection olapConnection = getConnection();

        MdxParser mdxParser =
            olapConnection.getParserFactory().createMdxParser(olapConnection);

        SelectNode before = mdxParser.parseSelect(initialMdx);
        SelectNode after = trans.apply(before);

        // we also parse the expected MDX in order to normalize it
        // (eliminate any whitespace / capitalization differences)
        // note: CallNodes are not aware of function names, and as such
View Full Code Here

Examples of org.olap4j.mdx.parser.MdxParser.parseSelect()

        // (eliminate any whitespace / capitalization differences)
        // note: CallNodes are not aware of function names, and as such
        // will be compared in a case-sensitive manner
        // (i.e. [SomeMember].Children vs [SomeMember].children are not
        // equal, even if they are equivalent in MDX)
        SelectNode expected = mdxParser.parseSelect(expectedMdx);

        // TODO: consider adding .equals() method to ParseTreeNode instead
        // of comparing strings (we could ignore case when comparing
        // function names in CallNodes ...)
        assertEquals(expected.toString(), after.toString());
View Full Code Here

Examples of org.olap4j.mdx.parser.MdxParser.parseSelect()

    String mdx = getMdx();
    try {

      if (mdx != null && mdx.length() > 0 && mdx.toUpperCase().contains("FROM")) {
        SelectNode select =
            mdxParser.parseSelect(getMdx());
        select = mdxValidator.validateSelect(select);
        CubeType cubeType = (CubeType) select.getFrom().getType();
        return cubeType.getCube();
      }
    } catch (Exception e) {
View Full Code Here

Examples of org.olap4j.mdx.parser.impl.DefaultMdxParserImpl.parseSelect()

            + "SELECT\n"
            + "{[Measures].[Sales]} ON COLUMNS\n"
            + "FROM [cube]\n"
            + "WHERE ([CustomerDim].[CustomerName].[XL_QZX])";
        final MdxParser parser = new DefaultMdxParserImpl();
        SelectNode rootNode = parser.parseSelect(query);
        TestContext.assertEqualsVerbose(
            "WITH\n"
            + "MEMBER [CustomerDim].[CustomerName].[XL_QZX] AS\n"
            + "    Aggregate({[CustomerDim].[CustomerName].&[ABC INT'L], [CustomerDim].[CustomerName].&[XYZ]})\n"
            + "SELECT\n"
View Full Code Here

Examples of org.olap4j.mdx.parser.impl.DefaultMdxParserImpl.parseSelect()

        // Now named set
        query =
            "WITH SET Foo as Filter(Bar.Members, Instr(Name, \"'\") > 0)\n"
            + "SELECT FROM [Cube]";
        rootNode = parser.parseSelect(query);
        TestContext.assertEqualsVerbose(
            "WITH\n"
            + "SET Foo AS\n"
            + "    Filter(Bar.Members, (Instr(Name, \"'\") > 0))\n"
            + "SELECT\n"
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.