aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabine Heider2012-09-19 05:08:11 (EDT)
committertware2013-02-27 13:15:25 (EST)
commit83e8f39aa859b3e992a88c78e05b046bb2e3fb14 (patch)
treeefc47f06aa7e9e6eb2a70c23f8905df6c38caf94
parent3986d3937275d6a918ce3a684cc8913789450137 (diff)
downloadincubator-83e8f39aa859b3e992a88c78e05b046bb2e3fb14.zip
incubator-83e8f39aa859b3e992a88c78e05b046bb2e3fb14.tar.gz
incubator-83e8f39aa859b3e992a88c78e05b046bb2e3fb14.tar.bz2
HANAPlatform: Add support for local temporary tables
- Bug TBD - Local temporary tables introduced in HANAPlatform - Ant build file changed to allow merging of compiled HANAPlatform into main eclipselink.jar Signed-off-by: Sabine Heider <sabine.heider@sap.com>
-rw-r--r--extensions/org.eclipse.persistence.platform.database.hana/build.xml4
-rw-r--r--extensions/org.eclipse.persistence.platform.database.hana/src/org/eclipse/persistence/platform/database/HANAPlatform.java12
2 files changed, 13 insertions, 3 deletions
diff --git a/extensions/org.eclipse.persistence.platform.database.hana/build.xml b/extensions/org.eclipse.persistence.platform.database.hana/build.xml
index de4f84e..f112910 100644
--- a/extensions/org.eclipse.persistence.platform.database.hana/build.xml
+++ b/extensions/org.eclipse.persistence.platform.database.hana/build.xml
@@ -82,6 +82,10 @@
</fileset>
</zip>
</target>
+
+ <target name="merge-platform" description="merge the hana platform jar into the eclipselink jar in the trunk directory" depends="compile">
+ <jar jarfile="${eclipselink-jar.file}" basedir="${classes.dir}" update="true"/>
+ </target>
<target name="merge-src" description="copy HANA platform and test sources into eclipselink trunk repository for testing purposes">
<unzip src="${hana.platform.src.zip}" dest="${trunk.dir}/foundation/org.eclipse.persistence.core/src" overwrite="yes"/>
diff --git a/extensions/org.eclipse.persistence.platform.database.hana/src/org/eclipse/persistence/platform/database/HANAPlatform.java b/extensions/org.eclipse.persistence.platform.database.hana/src/org/eclipse/persistence/platform/database/HANAPlatform.java
index 0569abe..b921dd5 100644
--- a/extensions/org.eclipse.persistence.platform.database.hana/src/org/eclipse/persistence/platform/database/HANAPlatform.java
+++ b/extensions/org.eclipse.persistence.platform.database.hana/src/org/eclipse/persistence/platform/database/HANAPlatform.java
@@ -39,6 +39,7 @@ import org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter;
import org.eclipse.persistence.internal.expressions.FunctionExpression;
import org.eclipse.persistence.internal.expressions.SQLSelectStatement;
import org.eclipse.persistence.internal.helper.ClassConstants;
+import org.eclipse.persistence.internal.helper.DatabaseTable;
import org.eclipse.persistence.internal.helper.Helper;
import org.eclipse.persistence.internal.helper.NonSynchronizedVector;
import org.eclipse.persistence.internal.sessions.AbstractSession;
@@ -377,15 +378,20 @@ public final class HANAPlatform extends DatabasePlatform {
@Override
public final boolean supportsGlobalTempTables() {
- return false;
+ return false;
}
@Override
protected final String getCreateTempTableSqlPrefix() {
- return "CREATE TEMPORARY TABLE ";
+ return "CREATE LOCAL TEMPORARY TABLE ";
}
@Override
+ public DatabaseTable getTempTableForTable(DatabaseTable table) {
+ return new DatabaseTable("#" + table.getName(), table.getTableQualifier(), table.shouldUseDelimiters(), getStartDelimiter(), getEndDelimiter());
+ }
+
+ @Override
protected boolean shouldTempTableSpecifyPrimaryKeys() {
return false;
}
@@ -397,7 +403,7 @@ public final class HANAPlatform extends DatabasePlatform {
@Override
public final boolean supportsLocalTempTables() {
- return false;
+ return true;
}
@Override