Package mondrian.olap

Examples of mondrian.olap.Connection.execute()


        final String statement = request.getStatement();
        final QueryPart parseTree = connection.parseStatement(statement);
        final DrillThrough drillThrough = (DrillThrough) parseTree;
        final Query query = drillThrough.getQuery();
        query.setResultStyle(ResultStyle.LIST);
        final Result result = connection.execute(query);
        // cell [0, 0] in a 2-dimensional query, [0, 0, 0] in 3 dimensions, etc.
        final int[] coords = new int[result.getAxes().length];
        Cell dtCell = result.getCell(coords);

        if (!dtCell.canDrillThrough()) {
View Full Code Here


                    HSB_PARSE_QUERY_FAULT_FS,
                    ex);
            }
            final Result result;
            try {
                result = connection.execute(query);
            } catch (XmlaException ex) {
                throw ex;
            } catch (Exception ex) {
                throw new XmlaException(
                    SERVER_FAULT_FC,
View Full Code Here

     */
    public Result executeQuery(String queryString) {
        Connection connection = getConnection();
        queryString = upgradeQuery(queryString);
        Query query = connection.parseQuery(queryString);
        final Result result = connection.execute(query);

        // If we're deep testing, check that we never return the dummy null
        // value when cells are null. TestExpDependencies isn't the perfect
        // switch to enable this, but it will do for now.
        if (MondrianProperties.instance().TestExpDependencies.booleanValue()) {
View Full Code Here

        for (int i = 0; i < paramValues.length;) {
            final String paramName = (String) paramValues[i++];
            final Object value = paramValues[i++];
            query.setParameter(paramName, value);
        }
        final Result result = connection.execute(query);
        final Cell cell = result.getCell(new int[]{0});

        if (expected == null) {
            expected = ""; // null values are formatted as empty string
        }
View Full Code Here

        try {
            final String cubeName = getDefaultCubeName();
            final String queryString =
                    "select {" + expression + "} on columns from " + cubeName;
            Query query = connection.parseQuery(queryString);
            connection.execute(query);
        } catch (Throwable e) {
            throwable = e;
        }
        checkThrowable(throwable, pattern);
    }
View Full Code Here

            String cubeName = getDefaultCubeName();
            if (cubeName.indexOf(' ') >= 0) {
                cubeName = Util.quoteMdxIdentifier(cubeName);
            }
            Query query = connection.parseQuery("select from " + cubeName);
            Result result = connection.execute(query);
            Util.discard(result);
            connection.close();
            return true;
        } catch (RuntimeException e) {
            Util.discard(e);
View Full Code Here

        final long parseMillis = afterParseMillis - start;
        assertTrue(
            "performance problem: parse took " + parseMillis + " milliseconds",
            parseMillis <= 10000);

        Result result = connection.execute(query);
        assertEquals(59, result.getAxes()[1].getPositions().size());

        // If this call took longer than 10 seconds,
        // or 2 seconds exclusing db access,
        // the performance bug has
View Full Code Here

        String queryString =
            "select {[Measures].[Unit Sales]} on columns,\n"
            + "{[Customers].members} on rows\n"
            + "from Sales";
        Query query = connection.parseQuery(queryString);
        Result result = connection.execute(query);
        assertEquals(10407, result.getAxes()[1].getPositions().size());
    }

    public void testUnparse() {
        Connection connection = getConnection();
View Full Code Here

                "Cancel request failed:  "
                + throwables[0]);
        }
        Throwable throwable = null;
        try {
            connection.execute(query);
        } catch (Throwable ex) {
            throwable = ex;
        }
        if (throwables[0] != null) {
            Assert.fail(
View Full Code Here

        Throwable throwable = null;
        try {
            Connection connection = getConnection();
            Query query = connection.parseQuery(queryString);
            query.setResultStyle(ResultStyle.LIST);
            connection.execute(query);
        } catch (Throwable ex) {
            throwable = ex;
        }

        TestContext.checkThrowable(
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.