Package mondrian.test

Examples of mondrian.test.TestContext.executeQuery()


        final TestContext context = getTestContext().withFreshConnection();
        try {
            // This MDX gets the [Product].[Product Family] cardinality
            // from the DB.
            context.executeQuery(query1);

            // This MDX should be able to reuse the cardinality for
            // [Product].[Product Family]; and should not issue a SQL to fetch
            // that from DB again.
            assertQuerySqlOrNot(context, query2, patterns, true, false, false);
View Full Code Here


                null,
                null);

        // This query causes "store"."store_country" cardinality to be
        // retrieved.
        testContext.executeQuery(query);

        // Query1 will find the "store"."store_country" cardinality in cache.
        assertQuerySqlOrNot(testContext, query1, patterns1, true, false, false);

        // Query2 again will not find the "store_ragged"."store_country"
View Full Code Here

            + "{[Measures].[Unit Sales]}\n"
            + "Axis #2:\n"
            + "{[Product].[Food].[Deli].[Meat], [Gender].[M]}\n"
            + "Row #0: 4,705\n");

        Result result = testContext.executeQuery(query);
        // this verifies that the caption for meat is Food
        assertEquals(
            "Meat",
            result.getAxes()[1].getPositions().get(0).get(0).getName());
        assertEquals(
View Full Code Here

                null,
                "<Measure name=\"Bogus Number\" column=\"promotion_id\" datatype=\"Numeric\" aggregator=\"max\" visible=\"true\"/>",
                null,
                null);

        context.executeQuery(query1);
        context.executeQuery(query2);
    }

}
// End NonCollapsedAggTest.java
View Full Code Here

                "<Measure name=\"Bogus Number\" column=\"promotion_id\" datatype=\"Numeric\" aggregator=\"max\" visible=\"true\"/>",
                null,
                null);

        context.executeQuery(query1);
        context.executeQuery(query2);
    }

}
// End NonCollapsedAggTest.java
View Full Code Here

            + "  </CalculatedMember>\n"
            + "</VirtualCube>",
            null,
            null,
            null);
        Result result = testContext.executeQuery(
            "select {[Measures].[Sales Count],\n"
            + " [Measures].[Store Cost],\n"
            + " [Measures].[Store Sales],\n"
            + " [Measures].[Units Shipped],\n"
            + " [Measures].[Profit]} on columns\n"
View Full Code Here

            + "</VirtualCube>",
            null,
            null,
            null);

        Result result = testContext.executeQuery(
            "select {[Measures].[Store Sqft]} ON COLUMNS,"
            + "{[HCB]} ON ROWS "
            + "from [VirtualTestStore]");

        Axis[] axes = result.getAxes();
View Full Code Here

            + "order by ISNULL(`store`.`store_country`) ASC,"
            + " `store`.`store_country` ASC,"
            + " ISNULL(`store`.`store_state`) ASC, `store`.`store_state` ASC";
        SqlPattern myPattern = new SqlPattern(MYSQL, mySql, mySql.length());
        SqlPattern[] patterns = {pgPattern, myPattern};
        context.executeQuery(mdx);
        assertQuerySqlOrNot(context, mdx, patterns, true, false, false);
    }

    /**
     * This is a test for
View Full Code Here

            + "  </Dimension>");

        // In this variant of the schema, Time2.Weekly has an explicit default
        // member.
        result =
            testContext.executeQuery(
                "select {[Time2.Weekly].DefaultMember} on columns\n"
                + "from Sales");
        Assert.assertEquals(
            "23",
            result.getAxes()[0].getPositions().get(0).get(0).getName());
View Full Code Here

            null,
            null,
            null,
            null);
        // this will throw an exception if .remove is called on the HCSTR list
        ctx.executeQuery(
            "select NON EMPTY filter([StoreSize].[Sqft].members, 1=1) on 0 from highCard");
    }

    //
    // Private Stuff --------------------------------------------
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.