Package mondrian.server

Examples of mondrian.server.Statement


      final MDXCompiler compiler = new MDXCompiler(parameters, getLocale());
      final String mdxQuery = compiler.translateAndLookup(rawMdxQuery, parameters);
      // Alternatively, JNDI is possible. Maybe even more ..
      final Query query = connection.parseQuery(mdxQuery);
      final Statement statement = query.getStatement();
      final int queryTimeoutValue = calculateQueryTimeOut(parameters);
      if (queryTimeoutValue > 0)
      {
        statement.setQueryTimeoutMillis(queryTimeoutValue * 1000);
      }

      parametrizeQuery(parameters, query);

      //noinspection deprecation
View Full Code Here


            wrapExpr(
                "([Measures].[Unit Sales]"
                + " * [Measures].[Store Cost]"
                + " * [Measures].[Store Sales])");

        final Statement statement =
            ((ConnectionBase) getConnection()).getInternalStatement();
        try {
            final QueryPart query =
                p.parseInternal(
                    new Parser.FactoryImpl(),
                    statement, mdx, false,
                    funTable, false);
            assertTrue(query instanceof Query);
            ((Query) query).resolve();
        } finally {
            statement.close();
        }
    }
View Full Code Here

        String expr,
        boolean strictValidation)
    {
        String mdx = wrapExpr(expr);
        final ConnectionBase connectionBase = (ConnectionBase) getConnection();
        final Statement statement =
            connectionBase.getInternalStatement();
        try {
            return (Query) connectionBase.parseStatement(
                statement, mdx, cftab, strictValidation);
        } finally {
            statement.close();
        }
    }
View Full Code Here

        super.setUp();

        TestContext testContext = getTestContext();
        ConnectionBase connection =
            (ConnectionBase) testContext.getConnection();
        final Statement statement =
            connection.getInternalStatement();

        try {
            queryWithCellProps =
                new Query(
                    statement, formulas, axes, "Sales",
                    null, cellProps, false);
            queryWithoutCellProps =
                new Query(
                    statement, formulas, axes, "Sales",
                    null, new QueryPart[0], false);
        } finally {
            statement.close();
        }
    }
View Full Code Here

            MondrianProperties.instance().EnableRolapCubeMemberCache,
            false);
        RolapSchemaPool.instance().clear();

        final RolapConnection conn = (RolapConnection) getConnection();
        final Statement statement = conn.getInternalStatement();
        final Execution execution = new Execution(statement, 0);
        locus = new Locus(execution, getName(), null);
        Locus.push(locus);
    }
View Full Code Here

        this.purpose = purpose;
    }

    public long getStatementId() {
        if (locus.execution != null) {
            final Statement mondrianStatement =
                locus.execution.getMondrianStatement();
            if (mondrianStatement != null) {
                return mondrianStatement.getId();
            }
        }
        return -1;
    }
View Full Code Here

        segmentList.add(new Id.NameSegment(name));
        final Formula formula = new Formula(
            new Id(segmentList),
            createDummyExp(calc),
            new MemberProperty[0]);
        final Statement statement =
            schema.getInternalConnection().getInternalStatement();
        try {
            final Query query =
                new Query(
                    statement,
                    this,
                    new Formula[] {formula},
                    new QueryAxis[0],
                    null,
                    new QueryPart[0],
                    new Parameter[0],
                    false);
            query.createValidator().validate(formula);
            calculatedMemberList.add(formula);
            return (RolapMember) formula.getMdxMember();
        } finally {
            statement.close();
        }
    }
View Full Code Here

TOP

Related Classes of mondrian.server.Statement

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.