Class DB2ZPlatform
-
- All Implemented Interfaces:
Serializable,Cloneable,CorePlatform<ConversionManager>,Platform
public class DB2ZPlatform extends DB2Platform
Purpose: Provides DB2 z/OS specific behavior.This provides for some additional compatibility in certain DB2 versions.
Responsibilities:
- Support creating tables that handle multibyte characters
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
-
Fields 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, usesStringBinding
-
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery, uuidQuery
-
-
Constructor Summary
Constructors Constructor Description DB2ZPlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExpressionOperatorabsOperator()Disable binding support.protected ExpressionOperatoravgOperator()Disable binding support.protected ExpressionOperatorbetweenOperator()DB2 z/OS requires that at least one argument be a known typeprotected Hashtable<Class<?>,FieldTypeDefinition>buildFieldTypes()Return the mapping of class types to database types for the schema framework.StringbuildProcedureCallString(StoredProcedureCall call, AbstractSession session, AbstractRecord row)INTERNAL: Used for sp calls.protected ExpressionOperatorceilingOperator()Disable binding support.protected ExpressionOperatorconcatOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatorequalOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatorexpOperator()Disable binding support.protected ExpressionOperatorfloorOperator()Disable binding support.ObjectgetParameterValueFromDatabaseCall(CallableStatement statement, String name, AbstractSession session)INTERNAL Get the parameter from the JDBC statement with the given name.StringgetProcedureArgument(String name, Object parameter, DatasourceCall.ParameterType parameterType, StoredProcedureCall call, AbstractSession session)Obtain the platform specific argument stringStringgetProcedureOptionList()DB2 on Z uses ":" as prefix for procedure arguments.StringgetTableCreationSuffix()PUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation).ValueReadQuerygetTimestampQuery()INTERNAL: This method returns the query to select the timestamp from the server for DB2.protected ExpressionOperatorgreaterThanEqualOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatorgreaterThanOperator()DB2 z/OS requires that at least one argument be a known typeprotected voidinitializePlatformOperators()INTERNAL: Initialize any platform-specific operatorsprotected ExpressionOperatorinOperator()DB2 z/OS requires that at least one argument be a known typebooleanisDB2Z()protected ExpressionOperatorisNotNullOperator()Disable binding support.protected ExpressionOperatorisNullOperator()Disable binding support.protected ExpressionOperatorlessThanEqualOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatorlessThanOperator()Set binding support to PARTIAL.protected ExpressionOperatorlikeEscapeOperator()DB2 z/OS support for binding the LIKE ESCAPE character depends on database configuration (mixed vs DBCS).protected ExpressionOperatorlnOperator()Disable binding support.protected ExpressionOperatorlocate2Operator()Disable binding support.protected ExpressionOperatorlocateOperator()Disable binding support.protected ExpressionOperatorltrim2Operator()Disable binding support.protected ExpressionOperatorltrimOperator()Disable binding support.protected ExpressionOperatormodOperator()Disable binding support.protected ExpressionOperatornotBetweenOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatornotEqualOperator()DB2 z/OS requires that at least one argument be a known typeprotected ExpressionOperatornotLikeEscapeOperator()DB2 z/OS support for binding the LIKE ESCAPE character depends on database configuration (mixed vs DBCS).protected ExpressionOperatorpowerOperator()Disable binding support.voidregisterOutputParameter(CallableStatement statement, String name, int jdbcType)This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.voidregisterOutputParameter(CallableStatement statement, String name, int jdbcType, String typeName)This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.protected ExpressionOperatorroundOperator()Disable binding support.protected ExpressionOperatorrtrim2Operator()Disable binding support.protected ExpressionOperatorrtrimOperator()Disable binding support.protected voidsetNullFromDatabaseField(DatabaseField databaseField, CallableStatement statement, String name)voidsetParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session)INTERNAL Set the parameter in the JDBC statement with the given name.protected ExpressionOperatorsignOperator()Disable binding support.protected ExpressionOperatorsqrtOperator()Disable binding support.protected ExpressionOperatorsumOperator()Disable binding support.protected ExpressionOperatortrim2()Disable binding support.protected ExpressionOperatortrimOperator()Disable binding support.-
Methods inherited from class org.eclipse.persistence.platform.database.DB2Platform
allowBindingForSelectClause, appendByteArray, appendCalendar, appendDate, appendDB2Calendar, appendDB2Date, appendDB2Timestamp, appendTime, appendTimestamp, ascendingOperator, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, caseConditionOperator, caseOperator, coalesceOperator, count, descendingOperator, disableAllBindingExpression, disableAtLeast1BindingExpression, distinct, dontBindUpdateAllQueryUsingTempTables, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxUniqueKeyNameSize, getNativeTableInfo, getNoWaitString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureEndString, getSelectForUpdateString, getTempTableForTable, initializeConnectionData, isAlterSequenceObjectSupported, isDB2, isDynamicSQLRequiredForFunctions, isNullAllowedInSelectClause, lengthOperator, max, maximumNumericValues, min, minimumNumericValues, nullifOperator, printFieldIdentityClause, printFieldTypeSize, printSQLSelectStatement, shouldBindPartialParameters, shouldIgnoreException, shouldPrintForUpdateClause, shouldPrintOutputTokenAtStart, shouldUseJDBCOuterJoinSyntax, supportsGlobalTempTables, supportsIdentity, supportsLockingQueriesWithMultipleTables, supportsOrderByParameters, supportsSequenceObjects, writeParameterMarker
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, 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, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getJsonPlatform, getMaxBatchWritingSize, getMaxIndexNameSize, getObjectFromResultSet, getOutputProcedureToken, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureCallTail, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, 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, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, 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
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, createExpressionFor, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle, isOracle12, isOracle23, 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, setUUIDQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.Platform
connectionProperties
-
-
-
-
Method Detail
-
buildFieldTypes
protected Hashtable<Class<?>,FieldTypeDefinition> buildFieldTypes()
Description copied from class:DatabasePlatformReturn the mapping of class types to database types for the schema framework.- Overrides:
buildFieldTypesin classDB2Platform
-
getTableCreationSuffix
public String getTableCreationSuffix()
Description copied from class:DatabasePlatformPUBLIC: Get the String used on all table creation statements generated from the DefaultTableGenerator with a session using this project (DDL generation). This value will be appended to CreationSuffix strings stored on the DatabaseTable or TableDefinition.- Overrides:
getTableCreationSuffixin classDatabasePlatform
-
getProcedureArgument
public String getProcedureArgument(String name, Object parameter, DatasourceCall.ParameterType parameterType, StoredProcedureCall call, AbstractSession session)
Description copied from class:DB2PlatformObtain the platform specific argument string- Overrides:
getProcedureArgumentin classDB2Platform
-
getProcedureOptionList
public String getProcedureOptionList()
DB2 on Z uses ":" as prefix for procedure arguments.- Overrides:
getProcedureOptionListin classDatabasePlatform- See Also:
StoredProcedureDefinition
-
getTimestampQuery
public ValueReadQuery getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for DB2.- Specified by:
getTimestampQueryin interfacePlatform- Overrides:
getTimestampQueryin classDB2Platform
-
initializePlatformOperators
protected void initializePlatformOperators()
INTERNAL: Initialize any platform-specific operators- Overrides:
initializePlatformOperatorsin classDB2Platform
-
avgOperator
protected ExpressionOperator avgOperator()
Disable binding support.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
-
sumOperator
protected ExpressionOperator sumOperator()
Disable binding support.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
-
absOperator
protected ExpressionOperator absOperator()
Disable binding support.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
-
concatOperator
protected ExpressionOperator concatOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
- Overrides:
concatOperatorin classDB2Platform
-
equalOperator
protected ExpressionOperator equalOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
notEqualOperator
protected ExpressionOperator notEqualOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
greaterThanOperator
protected ExpressionOperator greaterThanOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
greaterThanEqualOperator
protected ExpressionOperator greaterThanEqualOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
lessThanOperator
protected ExpressionOperator lessThanOperator()
Set binding support to PARTIAL.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
-
lessThanEqualOperator
protected ExpressionOperator lessThanEqualOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
isNullOperator
protected ExpressionOperator isNullOperator()
Disable binding support.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
-
isNotNullOperator
protected ExpressionOperator isNotNullOperator()
Disable binding support.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
-
betweenOperator
protected ExpressionOperator betweenOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
notBetweenOperator
protected ExpressionOperator notBetweenOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
likeEscapeOperator
protected ExpressionOperator likeEscapeOperator()
DB2 z/OS support for binding the LIKE ESCAPE character depends on database configuration (mixed vs DBCS). Since we cannot know how the database in configured, we will disable parameter binding for the ESCAPEWith 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
-
notLikeEscapeOperator
protected ExpressionOperator notLikeEscapeOperator()
DB2 z/OS support for binding the LIKE ESCAPE character depends on database configuration (mixed vs DBCS). Since we cannot know how the database in configured, we will disable parameter binding for the ESCAPEWith 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
-
locateOperator
protected ExpressionOperator locateOperator()
Disable binding support.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, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
-
locate2Operator
protected ExpressionOperator locate2Operator()
Disable binding support.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, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
-
modOperator
protected ExpressionOperator modOperator()
Disable binding support.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, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
-
sqrtOperator
protected ExpressionOperator sqrtOperator()
Disable binding support.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
-
trimOperator
protected ExpressionOperator trimOperator()
Disable binding support.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
-
trim2
protected ExpressionOperator trim2()
Disable binding support.With binding enabled, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
- Overrides:
trim2in classDB2Platform
-
ltrimOperator
protected ExpressionOperator ltrimOperator()
Disable binding support.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
-
ltrim2Operator
protected ExpressionOperator ltrim2Operator()
Disable binding support.With binding enabled, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
- Overrides:
ltrim2Operatorin classDB2Platform
-
rtrimOperator
protected ExpressionOperator rtrimOperator()
Disable binding support.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
-
rtrim2Operator
protected ExpressionOperator rtrim2Operator()
Disable binding support.With binding enabled, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
- Overrides:
rtrim2Operatorin classDB2Platform
-
inOperator
protected ExpressionOperator inOperator()
DB2 z/OS requires that at least one argument be a known typeWith 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
-
ceilingOperator
protected ExpressionOperator ceilingOperator()
Disable binding support.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
-
floorOperator
protected ExpressionOperator floorOperator()
Disable binding support.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
-
roundOperator
protected ExpressionOperator roundOperator()
Disable binding support.With binding enabled, DB2 z/OS will throw an error:
The data type, the length, or the value of an argument of a scalar function is incorrect. DB2 SQL Error: SQLCODE=-171, SQLSTATE=42815
- Overrides:
roundOperatorin classDB2Platform
-
expOperator
protected ExpressionOperator expOperator()
Disable binding support.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
-
lnOperator
protected ExpressionOperator lnOperator()
Disable binding support.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
-
powerOperator
protected ExpressionOperator powerOperator()
Disable binding support.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
-
signOperator
protected ExpressionOperator signOperator()
Disable binding support.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
-
isDB2Z
public boolean isDB2Z()
- Specified by:
isDB2Zin interfacePlatform- Overrides:
isDB2Zin classDatasourcePlatform
-
buildProcedureCallString
public String buildProcedureCallString(StoredProcedureCall call, AbstractSession session, AbstractRecord row)
INTERNAL: Used for sp calls. PostGreSQL uses a different method for executing StoredProcedures than other platforms.- Overrides:
buildProcedureCallStringin classDatabasePlatform
-
registerOutputParameter
public void registerOutputParameter(CallableStatement statement, String name, int jdbcType) throws SQLException
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.- Overrides:
registerOutputParameterin classDatabasePlatform- Throws:
SQLException- See Also:
CallableStatement.registerOutParameter(String parameterName, int sqlType)
-
registerOutputParameter
public void registerOutputParameter(CallableStatement statement, String name, int jdbcType, String typeName) throws SQLException
This method is used to register output parameter on Callable Statements for Stored Procedures as each database seems to have a different method.- Overrides:
registerOutputParameterin classDatabasePlatform- Throws:
SQLException- See Also:
CallableStatement.registerOutParameter(String parameterName, int sqlType, String typeName)
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session) throws SQLException
Description copied from class:DatabasePlatformINTERNAL Set the parameter in the JDBC statement with the given name. This support a wide range of different parameter types, and is heavily optimized for common types.- Overrides:
setParameterValueInDatabaseCallin classDatabasePlatform- Throws:
SQLException
-
setNullFromDatabaseField
protected void setNullFromDatabaseField(DatabaseField databaseField, CallableStatement statement, String name) throws SQLException
- Overrides:
setNullFromDatabaseFieldin classDatabasePlatform- Throws:
SQLException
-
getParameterValueFromDatabaseCall
public Object getParameterValueFromDatabaseCall(CallableStatement statement, String name, AbstractSession session) throws SQLException
Description copied from class:DatabasePlatformINTERNAL Get the parameter from the JDBC statement with the given name.- Overrides:
getParameterValueFromDatabaseCallin classDatabasePlatform- Throws:
SQLException
-
-