Skip to content

Commit

Permalink
MONDRIAN: Add support for Ingres, LucidDB, Teradata.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 8147]
  • Loading branch information
julianhyde committed Nov 15, 2006
1 parent 61a4c87 commit e467db7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 10 deletions.
30 changes: 23 additions & 7 deletions mondrian.properties
Expand Up @@ -29,11 +29,23 @@ RoleXX='California manager';
# uncommenting and modifying one of the sections below.
# Put the JDBC driver jar into mondrian/testlib.

# Derby: needs user and password
#mondrian.foodmart.jdbcURL=jdbc:derby:demo/derby/foodmart
#mondrian.foodmart.jdbcUser=sa
#mondrian.foodmart.jdbcPassword=sa
#mondrian.jdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver
#driver.classpath=testlib/derby.jar

# FireBirdSQL
#mondrian.foodmart.jdbcURL=jdbc:firebirdsql:localhost/3050:/mondrian/foodmart.gdb
#mondrian.jdbcDrivers=org.firebirdsql.jdbc.FBDriver
#driver.classpath=/jdbc/fb/firebirdsql-full.jar

# LucidDB
#mondrian.foodmart.jdbcURL=
#mondrian.jdbcDrivers=
#driver.classpath=

# Oracle (needs user and password)
#oracle.home=G:/oracle/product/10.1.0/Db_1
#mondrian.foodmart.jdbcURL.oracle=jdbc:oracle:thin:@//<host>:<port>/<service_name>
Expand Down Expand Up @@ -62,26 +74,30 @@ RoleXX='California manager';
#mondrian.jdbcDrivers=com.mysql.jdbc.Driver
#driver.classpath=D:/mysql-connector-3.1.12

# Ingres
#mondrian.foodmart.jdbcURL=jdbc:ingres://192.168.200.129:II7/MondrianFoodMart;LOOP=on;AUTO=multi;UID=ingres;PWD=sergni
#mondrian.jdbcDrivers=com.ingres.jdbc.IngresDriver
#driver.classpath=c:/ingres2006/ingres/lib/iijdbc.jar

# Postgres: needs user and password
#mondrian.foodmart.jdbcURL=jdbc:postgresql://localhost/FM3
#mondrian.foodmart.jdbcUser=postgres
#mondrian.foodmart.jdbcPassword=pgAdmin
#mondrian.jdbcDrivers=org.postgresql.Driver

# Derby: needs user and password
#mondrian.foodmart.jdbcURL=jdbc:derby:demo/derby/foodmart
#mondrian.foodmart.jdbcUser=sa
#mondrian.foodmart.jdbcPassword=sa
#mondrian.jdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver
#driver.classpath=testlib/derby.jar

# Sybase
#mondrian.foodmart.jdbcURL=jdbc:jtds:sybase://xxx.xxx.xxx.xxx:port/dbName
#mondrian.foodmart.jdbcUser=<USER>
#mondrian.foodmart.jdbcPassword=<PASSWORD>
#mondrian.jdbcDrivers=net.sourceforge.jtds.jdbc.Driver
#driver.classpath=<PATH>/jtds-1.2.jar

# Teradata
#mondrian.foodmart.jdbcURL=jdbc:teradata://DatabaseServerName/DATABASE=FoodMart
#mondrian.foodmart.jdbcUser=<USER>
#mondrian.foodmart.jdbcPassword=<PASSWORD>
#mondrian.jdbcDrivers=com.ncr.teradata.TeraDriver
#driver.classpath=<PATH>/terajdbc/classes/terajdbc4.jar

###############################################################################
# Uncomment the following lines to run subsets of the test suite.
Expand Down
3 changes: 3 additions & 0 deletions src/main/mondrian/olap/Mondrian.xml
Expand Up @@ -973,6 +973,9 @@ Revision is $Id$
<Value>oracle</Value>
<Value>postgres</Value>
<Value>sybase</Value>
<Value>teradata</Value>
<Value>ingres</Value>
<Value>luciddb</Value>
</Attribute>
<CData/>
<Code><![CDATA[
Expand Down
33 changes: 30 additions & 3 deletions src/main/mondrian/rolap/sql/SqlQuery.java
Expand Up @@ -666,6 +666,12 @@ private String getBestName() {
best = "firebird";
} else if (isInterbase()) {
best = "interbase";
} else if (isIngres()) {
best = "ingres";
} else if (isLucidDB()) {
best = "luciddb";
} else if (isTeradata()) {
best = "teradata";
} else {
best = "generic";
}
Expand Down Expand Up @@ -833,6 +839,27 @@ public boolean isInformix() {
return productName.startsWith("Informix");
}

/**
* Returns whether the underlying database is Ingres.
*/
public boolean isIngres() {
return productName.toUpperCase().equals("INGRES");
}

/**
* Returns whether the underlying database is Interbase.
*/
public boolean isInterbase() {
return productName.equals("Interbase");
}

/**
* Returns whether the underlying database is LucidDB.
*/
public boolean isLucidDB() {
return productName.toUpperCase().equals("LUCIDDB");
}

/**
* Returns whether the underlying database is Microsoft SQL Server.
*/
Expand Down Expand Up @@ -869,10 +896,10 @@ public boolean isSybase() {
}

/**
* Returns whether the underlying database is Interbase.
* Returns whether the underlying database is Teradata.
*/
public boolean isInterbase() {
return productName.equals("Interbase");
public boolean isTeradata() {
return productName.toUpperCase().indexOf("SYBASE") >= 0;
}

// -- behaviors --
Expand Down

0 comments on commit e467db7

Please sign in to comment.