public class DialectTest
extends junit.framework.TestCase
Dialect
accurately represents the capabilities of the underlying database.
The existing mondrian tests, when run on various databases and drivers, make sure that Dialect never over-states the capabilities of a particular database. But sometimes they under-state a database's capabilities: for example, MySQL version 3 did not allow subqueries in the FROM clause, but version 4 does. This test helps ensure that mondrian is using the full capabilities of each database.
NOTE: If you see failures in this test, let the mondrian developers know! You may be running a version of a database which no one has tried before, and which has more capabilities than we expect. If you tell us about them, we can change mondrian to use those features.
| Modifier and Type | Class and Description |
|---|---|
static class |
DialectTest.MockResultSetMetadata |
| Constructor and Description |
|---|
DialectTest(String name)
Creates a DialectTest.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toStringassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, failpublic DialectTest(String name)
name - Test case nameprotected DataSource getDataSource()
protected void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionprotected Dialect getDialect()
protected Connection getConnection()
public void testDialectVsDatabaseProduct()
throws SQLException
SQLExceptionpublic void testAllowsCompoundCountDistinct()
public void testAllowsCountDistinct()
public void testAllowsMultipleCountDistinct()
public void testAllowsDdl()
public void testAllowsFromQuery()
public void testRequiresFromQueryAlias()
public void testRequiresOrderByAlias()
public void testAllowsOrderByAlias()
public void testRequiresUnionOrderByOrdinal()
public void testRequiresUnionOrderByExprToBeInSelectClause()
public void testSupportsGroupByExpressions()
public void testAllowsGroupingSets()
Dialect.supportsGroupingSets()
dialect property is accurate.public void testSupportsMultiValueInExpr()
public void testResultSetConcurrency()
public void testGenerateInline()
throws SQLException
SQLExceptionpublic void testForceNullCollation()
throws SQLException
SQLExceptionprotected void assertQuerySucceeds(String sql)
sql - SQL query in current dialectprotected void assertQueryFails(String sql, String[] patterns)
sql - SQL querypatterns - Array of expected patterns, generally one for each
SQL dialect for which the test is expected to failpublic void testAllowsSelectNotInGroupBy()
throws SQLException
Dialect.allowsSelectNotInGroupBy().SQLExceptionpublic void testAllowsRegularExpressionInWhereClause()
throws Exception
Exceptionpublic void testComplexRegularExpression()
throws Exception
Exceptionpublic void testRegularExpressionSqlInjection()
throws SQLException
SQLExceptionpublic void testOracleTypeMapQuirks()
throws SQLException
SQLExceptionpublic void testPostgresGreenplumTypeMapQuirks()
throws SQLException
SQLExceptionpublic void testNetezzaTypeMapQuirks()
throws SQLException
SQLExceptionpublic void testMonetDBTypeMapQuirks()
throws SQLException
SQLExceptionpublic void testJdbcDialectTypeMap()
throws SQLException
SQLException