Class HANAPlatform
java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.HANAPlatform
- All Implemented Interfaces:
Serializable,Cloneable,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>,org.eclipse.persistence.internal.databaseaccess.Platform
Database Platform for SAP HANA
Feature Testing
----------------------
- DDL Generation - Succeeds
- Outer Join - Succeeds
- Subquery - Succeeds
- Stored Procedure Calls - Not supported
- Stored Procedure Generation - Not supported
- Native Sequences/Identifier fields - Succeeds
- JPA Bulk Update/Delete - Succeeds with Limitations
- Batch Reading - Succeeds
- Batch Writing - Succeeds
- Pessimistic Locking - Succeeds with Limitations
- First Result/Limit - Succeeds with Limitations
- Expression Framework - Succeeds with Limitations
- Delimiters - Succeeds
- Auto Detection - Succeeds
Limitations
----------------
- Reserved SQL keywords cannot be used as table, column or sequence names. Use a different name, or enclose the name in double quotes. For example: @Column(name="\"LANGUAGE\"")
- Pessimistic locking adds 'FOR UPDATE' to the SELECT statement, and cannot be used with queries that use DISTINCT.
- Pessimistic locking cannot be used with queries that select from multiple tables.
- The LockNoWait option of Pessimistic Locking cannot be used; it is ignored when specified (i.e. only 'FOR UPDATE' is added to the SELECT statement).
- Bulk update and delete operations that require multiple tables to be accessed cannot be used (e.g. bulk operation on an entity that is part of an inheritance hierarchy, UpdateAll and DeleteAll queries). <li>'= NULL' and '<> NULL' cannot be used for null comparisons in the WHERE clause. Use 'IS (NOT) NULL' instead.
- Scrollable cursors are not supported.
- Query timeouts are not supported.
- See Also:
- Author:
- Reiner Singer (SAP AG), Sabine Heider (SAP AG)
-
Field Summary
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZEFields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBindingFields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendCalendar(Calendar calendar, Writer writer) Answer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation.protected voidappendDate(Date date, Writer writer) Answer a platform correct string representation of a Date, suitable for SQL generation.protected voidappendTime(Time time, Writer writer) Answer a platform correct string representation of a Time, suitable for SQL generation.protected voidappendTimestamp(Timestamp timestamp, Writer writer) Answer a platform correct string representation of a Timestamp, suitable for SQL generation.protected HashtableReturn the mapping of class types to database types for the schema framework.buildSelectQueryForSequenceObject(String sequenceName, Integer size) INTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence).booleancanBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call) INTERNAL: Supports Batch Writing with Optimistic Locking.intcomputeMaxRowsForSQL(int firstResultIndex, int maxResults) INTERNAL: Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL.static ExpressionOperatorINTERNAL: Build locate operator with 3 params i.e.static ExpressionOperatorINTERNAL: Build locate operator i.e.intexecuteBatch(Statement statement, boolean isStatementPrepared) Internal: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes.protected StringINTERNAL: Override this method if the platform supports temporary tables.Used for stored procedure creation: Prefix for INPUT parameters.intINTERNAL: returns the maximum number of characters that can be used in a field name on this platform.This method is used to print the output parameter token when stored procedures are calledUsed for sp calls.Used for sp calls.org.eclipse.persistence.internal.helper.DatabaseTablegetTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table) INTERNAL: May override this method if the platform support temporary tables.protected voidInitialize any platform-specific operatorsbooleanINTERNAL: Indicates whether SELECT DISTINCT ...booleanisHANA()protected voidprintFieldTypeSize(Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType) voidprintSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement) INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.booleanUsed for table creation.booleanINTERNAL: That method affects UpdateAllQuery and DeleteAllQuery execution.booleanPUBLIC: Allows platform to choose whether to bind literals in DatabaseCalls or not.booleanReturn if our driver level data conversion optimization is enabled.booleanSome database require outer joins to be given in the where clause, others require it in the from clause.booleanINTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g.protected booleanINTERNAL: Indicates whether temporary table can specify primary keys (some platforms don't allow that).booleanJDBC defines and outer join syntax, many drivers do not support this.booleanbooleanINTERNAL: Indicates whether the platform supports global temporary tables.booleanINTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.booleanINTERNAL: Indicates whether the platform supports local temporary tables.booleanbooleanINTERNAL: Indicates whether the platform supports sequence objects.booleanbooleanvoidwriteAddColumnClause(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session, TableDefinition table, FieldDefinition field) INTERNAL: May need to override this method if the platform supports ALTER TABLE ADD <column> and the generated sql doesn't work.Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowBindingForSelectClause, allowsSizeInProcedureArguments, appendBoolean, appendByteArray, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBuildCallWithReturning, checkTableExists, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInOutputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureArgument, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, minimumTimeIncrement, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setNullFromDatabaseField, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldBindPartialParameters, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceBindAllParameters, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsIndexes, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, wasFailureCommunicationBased, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSqlMethods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsIdentity, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
-
Constructor Details
-
HANAPlatform
public HANAPlatform()
-
-
Method Details
-
isHANA
public boolean isHANA()- Specified by:
isHANAin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
isHANAin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
usesStringBinding
public boolean usesStringBinding()- Overrides:
usesStringBindingin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
requiresUniqueConstraintCreationOnTableCreate
public boolean requiresUniqueConstraintCreationOnTableCreate()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformUsed for table creation. If a database platform does not support ALTER TABLE syntax to add/drop unique constraints (like Symfoware), overriding this method will allow the constraint to be specified in the CREATE TABLE statement.This only affects unique constraints specified using the UniqueConstraint annotation or equivalent method. Columns for which the 'unique' attribute is set to true will be declared 'UNIQUE' in the CREATE TABLE statement regardless of the return value of this method.
- Overrides:
requiresUniqueConstraintCreationOnTableCreatein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Returns:
- whether unique constraints should be declared as part of the CREATE TABLE statement instead of in separate ALTER TABLE ADD/DROP statements.
-
isForUpdateCompatibleWithDistinct
public boolean isForUpdateCompatibleWithDistinct()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform (Oracle doesn't allow this).- Overrides:
isForUpdateCompatibleWithDistinctin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsIndividualTableLocking
public boolean supportsIndividualTableLocking()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery. Example: the following locks the rows in SALARY table, doesn't lock the rows in EMPLOYEE table: on Oracle platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WHERE ... FOR UPDATE t1.SALARY on SQLServer platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WITH (UPDLOCK) WHERE ...- Overrides:
supportsIndividualTableLockingin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
buildFieldTypes
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformReturn the mapping of class types to database types for the schema framework.- Overrides:
buildFieldTypesin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
printFieldTypeSize
protected void printFieldTypeSize(Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition fieldType) throws IOException - Overrides:
printFieldTypeSizein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
initializePlatformOperators
protected void initializePlatformOperators()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformInitialize any platform-specific operators- Overrides:
initializePlatformOperatorsin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
createLocateOperator
INTERNAL: Build locate operator i.e. LOCATE("ob", t0.F_NAME) -
createLocate2Operator
INTERNAL: Build locate operator with 3 params i.e. LOCATE("coffee", t0.DESCRIP, 4). Last parameter is a start at. -
printSQLSelectStatement
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement) Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.- Overrides:
printSQLSelectStatementin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
computeMaxRowsForSQL
public int computeMaxRowsForSQL(int firstResultIndex, int maxResults) Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Use the JDBC maxResults and firstResultIndex setting to compute a value to use when limiting the results of a query in SQL. These limits tend to be used in two ways. 1. MaxRows is the index of the last row to be returned (like JDBC maxResults) 2. MaxRows is the number of rows to be returned By default, we assume case 1 and simply return the value of maxResults. Subclasses may provide an override- Overrides:
computeMaxRowsForSQLin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- See Also:
-
shouldOptimizeDataConversion
public boolean shouldOptimizeDataConversion()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformReturn if our driver level data conversion optimization is enabled. This can be disabled as some drivers perform data conversion themselves incorrectly.- Overrides:
shouldOptimizeDataConversionin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsNativeSequenceNumbers
public boolean supportsNativeSequenceNumbers()- Overrides:
supportsNativeSequenceNumbersin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
buildSelectQueryForSequenceObject
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformINTERNAL: Returns query used to read value generated by sequence object (like Oracle sequence). In case the other version of this method (taking no parameters) returns null, this method is called every time sequence object NativeSequence reads. If the platform supportsSequenceObjects then (at least) one of buildSelectQueryForSequenceObject methods should return non-null query.- Overrides:
buildSelectQueryForSequenceObjectin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
supportsGlobalTempTables
public boolean supportsGlobalTempTables()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Indicates whether the platform supports global temporary tables. "Global" means that an attempt to create temporary table with the same name for the second time results in exception. EclipseLink attempts to create global temporary table in the beginning of UpdateAllQuery, execution and assumes that it already exists in case SQLException results. In the end of UpdateAllQuery execution all rows are removed from the temporary table - it is necessary in case the same temporary table will be used by another UpdateAllQuery in the same transaction. Override this method if the platform supports global temporary tables. Note that this method is ignored in case supportsLocalTempTables() returns true.- Overrides:
supportsGlobalTempTablesin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getCreateTempTableSqlPrefix
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Override this method if the platform supports temporary tables. This should contain the beginning of sql string for creating temporary table - the sql statement name, for instance: "CREATE GLOBAL TEMPORARY TABLE ". Don't forget to end it with a space.- Overrides:
getCreateTempTableSqlPrefixin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getTempTableForTable
public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table) Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: May override this method if the platform support temporary tables.- Overrides:
getTempTableForTablein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Parameters:
table- is original table for which temp table is created.- Returns:
- temporary table
-
shouldTempTableSpecifyPrimaryKeys
protected boolean shouldTempTableSpecifyPrimaryKeys()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Indicates whether temporary table can specify primary keys (some platforms don't allow that). Used by writeCreateTempTableSql method.- Overrides:
shouldTempTableSpecifyPrimaryKeysin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getMaxFieldNameSize
public int getMaxFieldNameSize()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: returns the maximum number of characters that can be used in a field name on this platform.- Overrides:
getMaxFieldNameSizein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsLocalTempTables
public boolean supportsLocalTempTables()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Indicates whether the platform supports local temporary tables. "Local" means that several threads may create temporary tables with the same name. Local temporary table is created in the beginning of UpdateAllQuery execution and dropped in the end of it. Override this method if the platform supports local temporary tables.- Overrides:
supportsLocalTempTablesin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldAlwaysUseTempStorageForModifyAll
public boolean shouldAlwaysUseTempStorageForModifyAll()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: That method affects UpdateAllQuery and DeleteAllQuery execution. In case it returns false modify all queries would attempt to proceed without using temporary storage if it is possible. In case it returns true modify all queries would use temporary storage unless each modify statement doesn't reference any other tables. May need to override this method if the platform can't handle the sql generated for modify all queries without using temporary storage.- Overrides:
shouldAlwaysUseTempStorageForModifyAllin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldBindLiterals
public boolean shouldBindLiterals()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformPUBLIC: Allows platform to choose whether to bind literals in DatabaseCalls or not.- Overrides:
shouldBindLiteralsin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintOuterJoinInWhereClause
public boolean shouldPrintOuterJoinInWhereClause()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformSome database require outer joins to be given in the where clause, others require it in the from clause.- Overrides:
shouldPrintOuterJoinInWhereClausein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldUseJDBCOuterJoinSyntax
public boolean shouldUseJDBCOuterJoinSyntax()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformJDBC defines and outer join syntax, many drivers do not support this. So we normally avoid it.- Overrides:
shouldUseJDBCOuterJoinSyntaxin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsSequenceObjects
public boolean supportsSequenceObjects()Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformINTERNAL: Indicates whether the platform supports sequence objects. This method is to be used *ONLY* by sequencing classes- Overrides:
supportsSequenceObjectsin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
canBatchWriteWithOptimisticLocking
public boolean canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call) Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: Supports Batch Writing with Optimistic Locking.- Overrides:
canBatchWriteWithOptimisticLockingin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
executeBatch
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformInternal: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes.- Overrides:
executeBatchin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatformisStatementPrepared- - flag is set to true if this statement is prepared- Returns:
- - number of rows modified/deleted by this statement
- Throws:
SQLException
-
supportsForeignKeyConstraints
public boolean supportsForeignKeyConstraints()- Overrides:
supportsForeignKeyConstraintsin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getInputProcedureToken
Used for stored procedure creation: Prefix for INPUT parameters. Not required on most platforms.- Overrides:
getInputProcedureTokenin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getOutputProcedureToken
This method is used to print the output parameter token when stored procedures are called- Overrides:
getOutputProcedureTokenin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureCallTail
Used for sp calls.- Overrides:
getProcedureCallTailin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintStoredProcedureArgumentNameInCall
public boolean shouldPrintStoredProcedureArgumentNameInCall()INTERNAL: Should the variable name of a stored procedure call be printed as part of the procedure call e.g. EXECUTE PROCEDURE MyStoredProc(myvariable = ?)- Overrides:
shouldPrintStoredProcedureArgumentNameInCallin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsStoredFunctions
public boolean supportsStoredFunctions()- Overrides:
supportsStoredFunctionsin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
appendDate
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformAnswer a platform correct string representation of a Date, suitable for SQL generation. The date is printed in the ODBC platform independent format {d 'yyyy-mm-dd'}.- Overrides:
appendDatein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
appendTime
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformAnswer a platform correct string representation of a Time, suitable for SQL generation. The time is printed in the ODBC platform independent format {t'hh:mm:ss'}.- Overrides:
appendTimein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
appendTimestamp
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformAnswer a platform correct string representation of a Timestamp, suitable for SQL generation. The timestamp is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.- Overrides:
appendTimestampin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
appendCalendar
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformAnswer a platform correct string representation of a Calendar as a Timestamp, suitable for SQL generation. The calendar is printed in the ODBC platform independent timestamp format {ts'YYYY-MM-DD HH:MM:SS.NNNNNNNNN'}.- Overrides:
appendCalendarin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
writeAddColumnClause
public void writeAddColumnClause(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session, TableDefinition table, FieldDefinition field) throws IOException Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformINTERNAL: May need to override this method if the platform supports ALTER TABLE ADD <column> and the generated sql doesn't work. Write the string that follows ALTER TABLE to create a sql statement for the platform in order to append a new column to an existing table.- Overrides:
writeAddColumnClausein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
getProcedureCallHeader
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatformUsed for sp calls.- Overrides:
getProcedureCallHeaderin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-