Author: jolee
Date: 2013-02-05 15:34:44 -0500 (Tue, 05 Feb 2013)
New Revision: 4552
Modified:
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
Log:
TEIID-2374: OracleExecutionFactory should indicate support of common table expressions
for 9.2 or later
Modified:
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
---
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2013-02-05
20:21:35 UTC (rev 4551)
+++
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2013-02-05
20:34:44 UTC (rev 4552)
@@ -65,6 +65,9 @@
@Translator(name="oracle", description="A translator for Oracle 9i
Database or later")
public class OracleExecutionFactory extends JDBCExecutionFactory {
+ public static final String NINE_0 = "9.0"; //$NON-NLS-1$
+ public static final String NINE_2 = "9.2"; //$NON-NLS-1$
+
private static final String TIME_FORMAT = "HH24:MI:SS"; //$NON-NLS-1$
private static final String DATE_FORMAT = "YYYY-MM-DD"; //$NON-NLS-1$
private static final String DATETIME_FORMAT = DATE_FORMAT + " " + TIME_FORMAT;
//$NON-NLS-1$
@@ -98,6 +101,10 @@
static int FIXED_CHAR_TYPE = 999;
private boolean oracleSuppliedDriver = true;
+
+ public OracleExecutionFactory() {
+ setDatabaseVersion(NINE_0);
+ }
public void start() throws TranslatorException {
super.start();
@@ -738,4 +745,9 @@
return OracleFormatFunctionModifier.supportsLiteral(literal);
}
+ @Override
+ public boolean supportsCommonTableExpressions() {
+ return getDatabaseVersion().compareTo(NINE_2) >= 0;
+ }
+
}
Show replies by date