Package mondrian.olap

Examples of mondrian.olap.Connection.parseQuery()


            final Connection connection =
                getConnection(dsCatalog, role, roleName);

            final Query query;
            try {
                query = connection.parseQuery(statement);
                query.setResultStyle(ResultStyle.LIST);
            } catch (XmlaException ex) {
                throw ex;
            } catch (Exception ex) {
                throw new XmlaException(
View Full Code Here


    Connection mondrianConnection = smdt.getConnection();
    // retrieves CacheControl object
    CacheControl cacheControl = mondrianConnection.getCacheControl(null);
    // retrieves the MDX query
    MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
    Query mondrianQuery = mondrianConnection.parseQuery(mdxQuery.getMdxQuery());
    // finds the cube in the MDX query
      Cube cube = mondrianQuery.getCube();
      // flush cache on all measures for that cube
      CacheControl.CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);
      cacheControl.flush(measuresRegion);
View Full Code Here

    Connection monConnection = smdt.getConnection();
    // get the connection role, cube and schema reader
    RoleImpl connRole = (RoleImpl) monConnection.getRole();
    //connRole.makeMutableClone();
      logger.debug("DataSecurityManager::setMondrianRole:connection role retrived: " + connRole);
      Query monQuery = monConnection.parseQuery(query);
      Cube cube = monQuery.getCube();
      logger.debug("DataSecurityManager::setMondrianRole: cube retrived: " + cube);
      SchemaReader schemaReader = cube.getSchemaReader(null);
      logger.debug("DataSecurityManager::setMondrianRole: schema reader retrived: " + schemaReader);
   
View Full Code Here

    logger.debug("IN");
    StringBuffer buffer = new StringBuffer("parent.execCrossNavigation(window.name, '"
        + StringEscapeUtils.escapeJavaScript(target.documentLabel) + "', '");
    String query = model.getCurrentMdx();
    Connection monConnection = model.getConnection();
      Query monQuery = monConnection.parseQuery(query);
      Cube cube = monQuery.getCube();
     
      List<TargetParameter> parameters = target.parameters;
      if (!parameters.isEmpty()) {
        for (int i = 0; i < parameters.size(); i++) {
View Full Code Here

     * @param queryString Query string
     */
    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.
View Full Code Here

        String expected,
        Object... paramValues)
    {
        Connection connection = getConnection();
        String queryString = generateExpression(expr);
        Query query = connection.parseQuery(queryString);
        assert paramValues.length % 2 == 0;
        for (int i = 0; i < paramValues.length;) {
            final String paramName = (String) paramValues[i++];
            final Object value = paramValues[i++];
            query.setParameter(paramName, value);
View Full Code Here

        } else {
            queryString =
                "SELECT {" + expression + "} ON COLUMNS FROM " + cubeName;
        }
        Connection connection = getConnection();
        Query query = connection.parseQuery(queryString);
        final Exp exp;
        if (scalar) {
            exp = query.getFormulas()[0].getExpression();
        } else {
            exp = query.getAxes()[0].getSet();
View Full Code Here

        Connection connection = getConnection();
        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

        // Construct a query, and mine it for a parsed expression.
        // Use a fresh connection, because some tests define their own dims.
        final Connection connection = getConnection();
        final String queryString =
                "SELECT {" + expr + "} ON COLUMNS FROM [Sales]";
        final Query query = connection.parseQuery(queryString);
        query.resolve();
        final Exp expression = query.getAxes()[0].getSet();

        // Build a list of the dimensions which the expression depends upon,
        // and check that it is as expected.
View Full Code Here

        final Connection connection = getConnection();
        final String queryString =
            "WITH MEMBER [Measures].[Foo] AS "
            + Util.singleQuoteString(expr)
            + " SELECT FROM [Sales]";
        final Query query = connection.parseQuery(queryString);
        query.resolve();
        final Formula formula = query.getFormulas()[0];
        final Exp expression = formula.getExpression();

        // Build a list of the dimensions which the expression depends upon,
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.