Package mondrian.test

Examples of mondrian.test.SqlPattern


            + "order by\n"
            + "    \"store\".\"store_country\" ASC NULLS LAST,\n"
            + "    \"store\".\"store_state\" ASC NULLS LAST";

        final SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, mysql, mysql),
            new SqlPattern(
                Dialect.DatabaseProduct.ORACLE, oracle, oracle)
        };

        final SqlPattern[] patternsWithFactJoin = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL,
                mysqlWithFactJoin, mysqlWithFactJoin),
            new SqlPattern(
                Dialect.DatabaseProduct.ORACLE,
                oracleWithFactJoin, oracleWithFactJoin)
        };

        final TestContext context =
View Full Code Here


            + "order by\n"
            + "    \"store\".\"store_country\" ASC NULLS LAST,\n"
            + "    \"store\".\"store_state\" ASC NULLS LAST";

        final SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, mysql, mysql),
            new SqlPattern(
                Dialect.DatabaseProduct.ORACLE, oracle, oracle)
        };

        final SqlPattern[] patternsWithFactJoin = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL,
                mysqlWithFactJoin, mysqlWithFactJoin),
            new SqlPattern(
                Dialect.DatabaseProduct.ORACLE,
                oracleWithFactJoin, oracleWithFactJoin)
        };

        final TestContext context =
View Full Code Here

                + "    `agg_c_14_sales_fact_1997`.`the_year` as `c0`,\n"
                + "    `agg_c_14_sales_fact_1997`.`quarter` as `c1`,\n"
                + "    `agg_c_14_sales_fact_1997`.`month_of_year` as `c2`,\n"
                + "    `product_class`.`product_family` as `c3`,\n";
        }
        SqlPattern mysqlPattern =
            new SqlPattern(
                DatabaseProduct.MYSQL,
                mysqlNativeCrossJoinQuery,
                triggerSql);

        assertQuerySql(mdx, new SqlPattern[]{mysqlPattern});
View Full Code Here

            + "`customer`.`country` ASC, ISNULL(`time_by_day`.`the_year`) ASC, "
            + "`time_by_day`.`the_year` ASC, ISNULL(`time_by_day`.`quarter`) ASC, "
            + "`time_by_day`.`quarter` ASC";

        SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.DERBY, necjSqlDerby, necjSqlDerby),
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, necjSqlMySql, necjSqlMySql)
        };

        assertQuerySql(query, patterns);
    }
View Full Code Here

            + "`customer`.`country` ASC, ISNULL(`time_by_day`.`the_year`) ASC, "
            + "`time_by_day`.`the_year` ASC, ISNULL(`time_by_day`.`quarter`) ASC, "
            + "`time_by_day`.`quarter` ASC";

        SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.DERBY, necjSqlDerby, necjSqlDerby),
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, necjSqlMySql, necjSqlMySql)
        };

        assertQuerySql(query, patterns);
    }
View Full Code Here

            + "ISNULL(`warehouse`.`wa_address1`), `warehouse`.`wa_address1` ASC, "
            + "ISNULL(`warehouse`.`warehouse_name`), `warehouse`.`warehouse_name` ASC, "
            + "ISNULL(`product_class`.`product_family`), `product_class`.`product_family` ASC";

        SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.DERBY, necjSqlDerby, necjSqlDerby),
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, necjSqlMySql, necjSqlMySql)
        };

        TestContext testContext =
            TestContext.instance().create(
View Full Code Here

            + "`warehouse`.`warehouse_name` ASC, "
            + "ISNULL(`product_class`.`product_family`), "
            + "`product_class`.`product_family` ASC";

        SqlPattern[] patterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.DERBY, necjSqlDerby, necjSqlDerby),
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL, necjSqlMySql, necjSqlMySql)
        };

        TestContext testContext =
            TestContext.instance().create(
View Full Code Here

            + "Select\n"
            + "[*BASE_MEMBERS_Measures] on columns,\n"
            + "[*SORTED_ROW_AXIS] on rows\n"
            + "From [Store] \n";
        final SqlPattern[] badPatterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL,
                badMysqlSQL,
                null)
        };
        final SqlPattern[] goodPatterns = {
            new SqlPattern(
                Dialect.DatabaseProduct.MYSQL,
                goodMysqlSQL,
                null)
        };
        final TestContext testContext =
View Full Code Here

            ")\n"+
            "on 0 from sales\n";
        assertQuerySql(
            mdx,
            new SqlPattern[] {
                new SqlPattern(Dialect.DatabaseProduct.MYSQL, sql, null)
            });
    }
View Full Code Here

    assertQuerySqlOrNot(
        TestContext.instance().withSchema(simpleSchema),
        query,
        new SqlPattern[]{
            new SqlPattern(
                DatabaseProduct.MYSQL,
                expectedSql,
                expectedSql.length())},
        false,
        true,
View Full Code Here

TOP

Related Classes of mondrian.test.SqlPattern

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.