Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MONDRIAN: Fix for MONDRIAN-605, hsqldb 1.8 fails when using top count…
…, order by NULLS FIRST, LAST SQL syntax not supported [git-p4: depot-paths = "//open/mondrian/": change = 13013]
- Loading branch information
Will Gorman
committed
Aug 20, 2009
1 parent
5581131
commit fcae81e
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -722,6 +722,7 @@ enum DatabaseProduct { | |
DB2_AS400, | ||
DB2, | ||
FIREBIRD, | ||
HSQLDB, | ||
INFORMIX, | ||
INFOBRIGHT, | ||
INGRES, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
// This software is subject to the terms of the Eclipse Public License v1.0 | ||
// Agreement, available at the following URL: | ||
// http://www.eclipse.org/legal/epl-v10.html. | ||
// Copyright (C) 2009 Pentaho | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package mondrian.spi.impl; | ||
|
||
import java.sql.Connection; | ||
import java.sql.SQLException; | ||
|
||
/** | ||
* Implementation of {@link mondrian.spi.Dialect} for the Hsqldb database. | ||
* | ||
* @author wgorman | ||
* @version $Id | ||
* @since Aug 20, 2009 | ||
*/ | ||
public class HsqldbDialect extends JdbcDialectImpl { | ||
|
||
public static final JdbcDialectFactory FACTORY = | ||
new JdbcDialectFactory( | ||
HsqldbDialect.class, | ||
DatabaseProduct.HSQLDB); | ||
|
||
/** | ||
* Creates a FirebirdDialect. | ||
* | ||
* @param connection Connection | ||
*/ | ||
public HsqldbDialect(Connection connection) throws SQLException { | ||
super(connection); | ||
} | ||
|
||
@Override | ||
public String generateOrderItem( | ||
String expr, | ||
boolean nullable, | ||
boolean ascending) | ||
{ | ||
if (ascending) { | ||
return expr + " ASC"; | ||
} else { | ||
return expr + " DESC"; | ||
} | ||
} | ||
} | ||
|
||
// End HsqldbDialect.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters