public class DB2Platform extends DatabasePlatform
Purpose: Provides DB2 specific behavior.
Responsibilities:
DEFAULT_VARCHAR_SIZE
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, Types_NCLOB, Types_SQLXML, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery
Constructor and Description |
---|
DB2Platform() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowBindingForSelectClause()
INTERNAL: DB2 does not allow stand alone, untyped parameter markers in select clause.
|
protected void |
appendByteArray(byte[] bytes,
java.io.Writer writer)
INTERNAL:
Append a byte[] in native DB@ format BLOB(hexString) if usesNativeSQL(),
otherwise use ODBC format from DatabasePLatform.
|
protected void |
appendCalendar(java.util.Calendar calendar,
java.io.Writer writer)
INTERNAL:
Append the Timestamp in native format if usesNativeSQL() is true
otherwise use ODBC format from DatabasePlatform.
|
protected void |
appendDate(java.sql.Date date,
java.io.Writer writer)
INTERNAL:
Appends the Date in native format if usesNativeSQL() otherwise use ODBC
format from DatabasePlatform.
|
protected void |
appendDB2Calendar(java.util.Calendar calendar,
java.io.Writer writer)
Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff).
|
protected void |
appendDB2Date(java.sql.Date date,
java.io.Writer writer)
INTERNAL:
Write a timestamp in DB2 specific format (mm/dd/yyyy).
|
protected void |
appendDB2Timestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL:
Write a timestamp in DB2 specific format (yyyy-mm-dd-hh.mm.ss.ffffff).
|
protected void |
appendTime(java.sql.Time time,
java.io.Writer writer)
INTERNAL:
Append the Time in Native format if usesNativeSQL() otherwise use ODBC
format from DAtabasePlatform.
|
protected void |
appendTimestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL:
Append the Timestamp in native format if usesNativeSQL() is true
otherwise use ODBC format from DatabasePlatform.
|
protected ExpressionOperator |
ascendingOperator()
Disable binding support.
|
protected java.util.Hashtable |
buildFieldTypes() |
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing.
|
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName,
java.lang.Integer size)
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
|
protected ExpressionOperator |
caseConditionOperator()
DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used
in an invalid way.
|
protected ExpressionOperator |
caseOperator()
DB2 does not allow untyped parameter binding for the THEN & ELSE 'result-expressions' of CASE expressions
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used
in an invalid way.
|
protected ExpressionOperator |
coalesceOperator()
DB2 requires that at least one argument be a known type
With binding enabled, DB2 will throw an error:
The statement cannot be executed because a parameter marker has been used
in an invalid way.
|
protected ExpressionOperator |
concatOperator()
INTERNAL:
The concat operator is of the form ....
|
protected ExpressionOperator |
count()
Disable binding support.
|
protected ExpressionOperator |
descendingOperator()
Disable binding support.
|
protected static ExpressionOperator |
disableAllBindingExpression()
Create an ExpressionOperator that disables all parameter binding
|
protected static ExpressionOperator |
disableAtLeast1BindingExpression()
Create an ExpressionOperator that requires at least 1 typed argument
|
protected ExpressionOperator |
distinct()
Disable binding support.
|
boolean |
dontBindUpdateAllQueryUsingTempTables()
INTERNAL: DB2 has issues with binding with temp table queries.
|
protected java.lang.String |
getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: DB2 allows LIKE to be used to create temp tables, which avoids having to know the types.
|
protected java.lang.String |
getCreateTempTableSqlPrefix()
INTERNAL: DB2 temp table syntax.
|
protected java.lang.String |
getCreateTempTableSqlSuffix()
INTERNAL: DB2 temp table syntax.
|
int |
getMaxFieldNameSize()
INTERNAL: returns the maximum number of characters that can be used in a
field name on this platform.
|
int |
getMaxForeignKeyNameSize()
INTERNAL: returns the maximum number of characters that can be used in a
foreign key name on this platform.
|
int |
getMaxUniqueKeyNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a unique key
name on this platform.
|
java.util.Vector |
getNativeTableInfo(java.lang.String table,
java.lang.String creator,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Return the catalog information through using the native SQL catalog
selects.
|
java.lang.String |
getNoWaitString()
INTERNAL: DB2 does not support NOWAIT.
|
java.lang.String |
getProcedureArgument(java.lang.String name,
java.lang.Object parameter,
org.eclipse.persistence.internal.databaseaccess.DatasourceCall.ParameterType parameterType,
StoredProcedureCall call,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Obtain the platform specific argument string
|
java.lang.String |
getProcedureAsString()
INTERNAL:
Used for stored procedure defs.
|
java.lang.String |
getProcedureBeginString()
Used for stored procedure defs.
|
java.lang.String |
getProcedureCallHeader()
INTERNAL:
Used for sp calls.
|
java.lang.String |
getProcedureEndString()
INTERNAL:
Used for stored procedure defs.
|
java.lang.String |
getSelectForUpdateString()
INTERNAL:
Used for pessimistic locking in DB2.
|
org.eclipse.persistence.internal.helper.DatabaseTable |
getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: DB2 temp table syntax.
|
ValueReadQuery |
getTimestampQuery()
INTERNAL:
This method returns the query to select the timestamp from the server for
DB2.
|
void |
initializeConnectionData(java.sql.Connection connection) |
protected void |
initializePlatformOperators()
INTERNAL:
Initialize any platform-specific operators
|
boolean |
isAlterSequenceObjectSupported()
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
|
boolean |
isDB2() |
boolean |
isDynamicSQLRequiredForFunctions()
INTERNAL
DB2 has some issues with using parameters on certain functions and relations.
|
boolean |
isNullAllowedInSelectClause()
INTERNAL: DB2 does not allow NULL in select clause.
|
protected ExpressionOperator |
lengthOperator()
Disable binding support.
|
protected ExpressionOperator |
ltrim2Operator()
DB2 does not support untyped parameter binding for
|
protected ExpressionOperator |
max()
Disable binding support.
|
java.util.Hashtable |
maximumNumericValues()
INTERNAL:
Builds a table of maximum numeric values keyed on java class.
|
protected ExpressionOperator |
min()
Disable binding support.
|
java.util.Hashtable |
minimumNumericValues()
INTERNAL:
Builds a table of minimum numeric values keyed on java class.
|
protected ExpressionOperator |
nullifOperator()
DB2 requires that at least one argument be a known type
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used
in an invalid way.
|
void |
printFieldIdentityClause(java.io.Writer writer)
INTERNAL: Append the receiver's field 'identity' constraint clause to a
writer.
|
protected void |
printFieldTypeSize(java.io.Writer writer,
FieldDefinition field,
org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition ftd) |
void |
printSQLSelectStatement(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.
|
protected ExpressionOperator |
rtrim2Operator()
DB2 does not support untyped parameter binding for
|
boolean |
shouldBindPartialParameters()
Used to determine if the platform should perform partial parameter binding or not
Enabled for DB2 and DB2 for zOS to add support for partial binding
|
boolean |
shouldIgnoreException(java.sql.SQLException exception)
INTERNAL:
Allow for the platform to ignore exceptions.
|
boolean |
shouldPrintForUpdateClause() |
boolean |
shouldPrintOutputTokenAtStart()
INTERNAL:
This is required in the construction of the stored procedures with output
parameters.
|
boolean |
shouldUseJDBCOuterJoinSyntax()
INTERNAL:
JDBC defines and outer join syntax, many drivers do not support this.
|
boolean |
supportsGlobalTempTables()
INTERNAL: DB2 supports temp tables.
|
boolean |
supportsIdentity()
INTERNAL: Indicates whether the platform supports identity.
|
boolean |
supportsLockingQueriesWithMultipleTables()
INTERNAL:
DB2 does not seem to allow FOR UPDATE on queries with multiple tables.
|
boolean |
supportsOrderByParameters()
DB2 disables single parameter usage in ORDER BY clause.
|
boolean |
supportsSequenceObjects()
INTERNAL: DB2 added SEQUENCE support as of (I believe) v8.
|
protected ExpressionOperator |
trim2()
DB2 does not support untyped parameter binding for
|
void |
writeParameterMarker(java.io.Writer writer,
org.eclipse.persistence.internal.expressions.ParameterExpression parameter,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
INTERNAL:
DB2 requires casting on certain operations, such as the CONCAT function,
and parameterized queries of the form, ":param = :param".
|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkTableExists, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxIndexNameSize, getObjectFromResultSet, getOutputProcedureToken, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureArgumentString, getProcedureCallTail, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, 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, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
public void initializeConnectionData(java.sql.Connection connection) throws java.sql.SQLException
initializeConnectionData
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.sql.SQLException
protected void appendByteArray(byte[] bytes, java.io.Writer writer) throws java.io.IOException
appendByteArray
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendDate(java.sql.Date date, java.io.Writer writer) throws java.io.IOException
appendDate
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendDB2Date(java.sql.Date date, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendDB2Timestamp(java.sql.Timestamp timestamp, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendDB2Calendar(java.util.Calendar calendar, java.io.Writer writer) throws java.io.IOException
java.io.IOException
protected void appendTime(java.sql.Time time, java.io.Writer writer) throws java.io.IOException
appendTime
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendTimestamp(java.sql.Timestamp timestamp, java.io.Writer writer) throws java.io.IOException
appendTimestamp
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected void appendCalendar(java.util.Calendar calendar, java.io.Writer writer) throws java.io.IOException
appendCalendar
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
protected java.util.Hashtable buildFieldTypes()
buildFieldTypes
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxFieldNameSize()
getMaxFieldNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxForeignKeyNameSize()
getMaxForeignKeyNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int getMaxUniqueKeyNameSize()
getMaxUniqueKeyNameSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.util.Vector getNativeTableInfo(java.lang.String table, java.lang.String creator, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.String getProcedureCallHeader()
getProcedureCallHeader
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getSelectForUpdateString()
getSelectForUpdateString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureEndString()
getProcedureEndString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureBeginString()
getProcedureBeginString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureAsString()
getProcedureAsString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getProcedureArgument(java.lang.String name, java.lang.Object parameter, org.eclipse.persistence.internal.databaseaccess.DatasourceCall.ParameterType parameterType, StoredProcedureCall call, org.eclipse.persistence.internal.sessions.AbstractSession session)
getProcedureArgument
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldBindPartialParameters()
shouldBindPartialParameters
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery getTimestampQuery()
getTimestampQuery
in interface org.eclipse.persistence.internal.databaseaccess.Platform
getTimestampQuery
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
protected void initializePlatformOperators()
initializePlatformOperators
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
protected static ExpressionOperator disableAllBindingExpression()
protected static ExpressionOperator disableAtLeast1BindingExpression()
protected ExpressionOperator ascendingOperator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X34: There is a ? parameter in the select list. This is not allowed.
protected ExpressionOperator descendingOperator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X34: There is a ? parameter in the select list. This is not allowed.
protected ExpressionOperator concatOperator()
protected ExpressionOperator count()
With binding enabled, DB2 will throw an error:
Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5
With binding enabled, DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X36: The 'COUNT' operator is not allowed to take a ? parameter as an operand.
protected ExpressionOperator max()
With binding enabled, DB2 will throw an error:
Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5
With binding enabled, DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X36: The 'MAX' operator is not allowed to take a ? parameter as an operand.
protected ExpressionOperator min()
With binding enabled, DB2 will throw an error:
Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5
With binding enabled, DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X36: The 'MIN' operator is not allowed to take a ? parameter as an operand.
protected ExpressionOperator distinct()
With binding enabled, DB2 will throw an error:
Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X34: There is a ? parameter in the select list. This is not allowed.
protected ExpressionOperator caseOperator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610Examples of places where parameter markers cannot be used:
With binding enabled, Derby will throw an error:
ERROR 42X87: At least one result expression (THEN or ELSE) of the CASE expression must have a known type.
protected ExpressionOperator caseConditionOperator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610Examples of places where parameter markers cannot be used:
With binding enabled, Derby will throw an error:
ERROR 42X87: At least one result expression (THEN or ELSE) of the CASE expression must have a known type.
protected ExpressionOperator lengthOperator()
With binding enabled, DB2 will throw an error:
Db2 cannot determine how to implicitly cast the arguments between string and numeric data types. DB2 SQL Error: SQLCODE=-245, SQLSTATE=428F5
With binding enabled, DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X36: The 'length' operator is not allowed to take a ? parameter as an operand.
protected ExpressionOperator nullifOperator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '=' to be ? parameters.
protected ExpressionOperator coalesceOperator()
With binding enabled, DB2 will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
With binding enabled, DB2 z/OS will throw an error:
The statement string specified as the object of a PREPARE contains a predicate or expression where parameter markers have been used as operands of the same operator for example: ? > ?. DB2 SQL Error: SQLCODE=-417, SQLSTATE=42609
With binding enabled, Derby will throw an error:
ERROR 42610: All the arguments to the COALESCE/VALUE function cannot be parameters. The function needs at least one argument that is not a parameter.
protected ExpressionOperator trim2()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
protected ExpressionOperator ltrim2Operator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
protected ExpressionOperator rtrim2Operator()
With binding enabled, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
public boolean isDB2()
isDB2
in interface org.eclipse.persistence.internal.databaseaccess.Platform
isDB2
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldIgnoreException(java.sql.SQLException exception)
shouldIgnoreException
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
printFieldIdentityClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
ValidationException
protected void printFieldTypeSize(java.io.Writer writer, FieldDefinition field, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition ftd) throws java.io.IOException
printFieldTypeSize
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public boolean supportsIdentity()
supportsIdentity
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean supportsGlobalTempTables()
supportsGlobalTempTables
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlPrefix()
getCreateTempTableSqlPrefix
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getTempTableForTable
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlSuffix()
getCreateTempTableSqlSuffix
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
protected java.lang.String getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
getCreateTempTableSqlBodyForTable
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public java.lang.String getNoWaitString()
getNoWaitString
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean dontBindUpdateAllQueryUsingTempTables()
dontBindUpdateAllQueryUsingTempTables
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isNullAllowedInSelectClause()
isNullAllowedInSelectClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isDynamicSQLRequiredForFunctions()
isDynamicSQLRequiredForFunctions
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean allowBindingForSelectClause()
allowBindingForSelectClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.internal.expressions.ConstantExpression#writeFields(ExpressionSQLPrinter, List, SQLSelectStatement)
,
org.eclipse.persistence.internal.expressions.ParameterExpression#writeFields(ExpressionSQLPrinter, List, SQLSelectStatement)
public void writeParameterMarker(java.io.Writer writer, org.eclipse.persistence.internal.expressions.ParameterExpression parameter, org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.databaseaccess.DatabaseCall call) throws java.io.IOException
writeParameterMarker
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
java.io.IOException
public boolean supportsLockingQueriesWithMultipleTables()
supportsLockingQueriesWithMultipleTables
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String qualifiedSeqName, java.lang.Integer size)
buildSelectQueryForSequenceObject
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean supportsSequenceObjects()
supportsSequenceObjects
in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public boolean supportsOrderByParameters()
If a parameter marker is used, DB2 & DB2 z/OS will throw an error:
The statement cannot be executed because a parameter marker has been used in an invalid way. DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610
If a parameter marker is used, Derby will throw an error:
ERROR 42X34: There is a ? parameter in the select list. This is not allowed.
supportsOrderByParameters
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean isAlterSequenceObjectSupported()
isAlterSequenceObjectSupported
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public boolean shouldPrintForUpdateClause()
shouldPrintForUpdateClause
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
printSQLSelectStatement
in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform