Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sabineheider committed Jan 8, 2013
1 parent 89106f5 commit 82e7df8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Expand Up @@ -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"/>
Expand Down
Expand Up @@ -39,6 +39,7 @@
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.platform.database.DatabasePlatform;
Expand Down Expand Up @@ -375,14 +376,19 @@ public final ValueReadQuery buildSelectQueryForSequenceObject(final String seque

@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;
Expand All @@ -395,7 +401,7 @@ public final int getMaxFieldNameSize() {

@Override
public final boolean supportsLocalTempTables() {
return false;
return true;
}

@Override
Expand Down

0 comments on commit 82e7df8

Please sign in to comment.