Class DerbyPlatform
- All Implemented Interfaces:
Serializable,Cloneable,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>,org.eclipse.persistence.internal.databaseaccess.Platform
- Direct Known Subclasses:
JavaDBPlatform
Purpose: Provides Derby DBMS specific behavior.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanAllow sequence support to be disabled for Derby < 10.6.1.static final intstatic final intFields 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 ExpressionOperatorDerby requires that at least one argument be a known typeprotected voidappendByteArray(byte[] bytes, Writer writer) INTERNAL: TODO: Need to find out how can byte arrays be inlined in DerbyintappendParameterInternal(Call call, Writer writer, Object parameter) Returns the number of parameters that used binding.protected ExpressionOperatorDisable binding support.protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected HashtableReturn the mapping of class types to database types for the schema framework.INTERNAL: Build the identity query for native sequencing.buildSequenceObjectDeletionWriter(Writer writer, String fullSeqName) INTERNAL: Derby supports sequence objects as of 10.6.1.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.protected ExpressionOperatorDerby requires that at least one argument be a known typeconvertToDatabaseType(Object value) Derby error the data type, length or value of arguments 'TIMESTAMP' and 'DATE' is incompatible.protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorINTERNAL: Derby does not support EXTRACT, but does have YEAR, MONTH, DAY, etc.protected StringgetCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table) INTERNAL:protected StringINTERNAL:This method is used to print the output parameter token when stored procedures are calledgetNativeTableInfo(String table, String creator, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Not currently used.Used for stored procedure defs.Used for stored procedure defs.INTERNAL: Used for pessimistic locking in DB2.INTERNAL: This method returns the query to select the timestamp from the server for Derby.protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typevoidinitializeConnectionData(Connection connection) INTERNAL:protected voidInitialize any platform-specific operatorsprotected ExpressionOperatorDerby requires that at least one argument be a known typebooleanINTERNAL: DB2 added SEQUENCE support as of (I believe) v8.booleanisDB2()booleanisDerby()INTERNAL: Answers whether platform is DerbybooleanINTERNAL Derby has some issues with using parameters on certain functions and relations.protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorEnable binding support.protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDerby requires that at least one argument be a known typevoidprintFieldIdentityClause(Writer writer) INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.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.protected ExpressionOperatorEnable binding support.protected voidsetNullFromDatabaseField(org.eclipse.persistence.internal.helper.DatabaseField databaseField, PreparedStatement statement, int index) voidsetParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL Set the parameter in the JDBC statement with the given name.voidsetParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL Set the parameter in the JDBC statement at the given index.booleanshouldIgnoreException(SQLException exception) Allow for the platform to ignore exceptions.booleanThis is required in the construction of the stored procedures with output parametersprotected booleanINTERNAL: Indicates whether temporary table can specify primary keys (some platforms don't allow that).protected ExpressionOperatorDerby requires that at least one argument be a known typeprotected ExpressionOperatorDisable binding support.booleanINTERNAL: Derby supports sequence objects as of 10.6.1.protected ExpressionOperatortrim2()Enable binding support.voidwriteUpdateOriginalFromTempTableSql(Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, Collection pkFields, Collection assignedFields) INTERNAL: May need to override this method if the platform supports temporary tables and the generated sql doesn't work.Methods inherited from class org.eclipse.persistence.platform.database.DB2Platform
allowBindingForSelectClause, appendCalendar, appendDate, appendDB2Calendar, appendDB2Date, appendDB2Timestamp, appendTime, appendTimestamp, ascendingOperator, buildSelectQueryForSequenceObject, caseConditionOperator, caseOperator, coalesceOperator, count, descendingOperator, disableAllBindingExpression, disableAtLeast1BindingExpression, distinct, dontBindUpdateAllQueryUsingTempTables, getCreateTempTableSqlPrefix, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getProcedureArgument, getProcedureAsString, getProcedureCallHeader, getTempTableForTable, isNullAllowedInSelectClause, lengthOperator, max, maximumNumericValues, min, minimumNumericValues, nullifOperator, printFieldTypeSize, shouldBindPartialParameters, shouldPrintForUpdateClause, shouldUseJDBCOuterJoinSyntax, supportsGlobalTempTables, supportsIdentity, supportsLockingQueriesWithMultipleTables, supportsOrderByParameters, writeParameterMarkerMethods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, checkTableExists, commitTransaction, 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, 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, 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, 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, writeTableCreationSuffixMethods 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, getEndDelimiter, getINClauseLimit, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2Z, isDBase, isFirebird, isH2, isHANA, 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, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
-
Field Details
-
MAX_CLOB
public static final int MAX_CLOB- See Also:
-
MAX_BLOB
public static final int MAX_BLOB- See Also:
-
isSequenceSupported
protected boolean isSequenceSupportedAllow sequence support to be disabled for Derby < 10.6.1. -
isConnectionDataInitialized
protected boolean isConnectionDataInitialized
-
-
Constructor Details
-
DerbyPlatform
public DerbyPlatform()
-
-
Method Details
-
appendByteArray
INTERNAL: TODO: Need to find out how can byte arrays be inlined in Derby- Overrides:
appendByteArrayin classDB2Platform- Throws:
IOException
-
convertToDatabaseType
Derby error the data type, length or value of arguments 'TIMESTAMP' and 'DATE' is incompatible. Instead, use a java.sql.Date type for property {d } casting- Overrides:
convertToDatabaseTypein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getTimestampQuery
INTERNAL: This method returns the query to select the timestamp from the server for Derby.- Specified by:
getTimestampQueryin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
getTimestampQueryin classDB2Platform
-
getNativeTableInfo
public Vector getNativeTableInfo(String table, String creator, org.eclipse.persistence.internal.sessions.AbstractSession session) INTERNAL: Not currently used.- Overrides:
getNativeTableInfoin classDB2Platform
-
getProcedureEndString
Used for stored procedure defs.- Overrides:
getProcedureEndStringin classDB2Platform
-
getProcedureBeginString
Used for stored procedure defs.- Overrides:
getProcedureBeginStringin classDB2Platform
-
getInOutputProcedureToken
This method is used to print the output parameter token when stored procedures are called- Overrides:
getInOutputProcedureTokenin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintOutputTokenAtStart
public boolean shouldPrintOutputTokenAtStart()This is required in the construction of the stored procedures with output parameters- Overrides:
shouldPrintOutputTokenAtStartin classDB2Platform
-
isDerby
public boolean isDerby()INTERNAL: Answers whether platform is Derby- Specified by:
isDerbyin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
isDerbyin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
isDB2
public boolean isDB2()- Specified by:
isDB2in interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
isDB2in classDB2Platform
-
getSelectForUpdateString
Description copied from class:DB2PlatformINTERNAL: Used for pessimistic locking in DB2. Without the "WITH RS" the lock is not held.- Overrides:
getSelectForUpdateStringin classDB2Platform
-
shouldIgnoreException
Allow for the platform to ignore exceptions.- Overrides:
shouldIgnoreExceptionin classDB2Platform
-
getCreateTempTableSqlSuffix
INTERNAL:- Overrides:
getCreateTempTableSqlSuffixin classDB2Platform
-
buildSelectQueryForIdentity
INTERNAL: Build the identity query for native sequencing.- Overrides:
buildSelectQueryForIdentityin classDB2Platform
-
shouldTempTableSpecifyPrimaryKeys
protected boolean shouldTempTableSpecifyPrimaryKeys()INTERNAL: 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
-
getCreateTempTableSqlBodyForTable
protected String getCreateTempTableSqlBodyForTable(org.eclipse.persistence.internal.helper.DatabaseTable table) INTERNAL:- Overrides:
getCreateTempTableSqlBodyForTablein classDB2Platform- Parameters:
table- is original table for which temp table is created.- Returns:
- String
-
writeUpdateOriginalFromTempTableSql
public void writeUpdateOriginalFromTempTableSql(Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException INTERNAL: May need to override this method if the platform supports temporary tables and the generated sql doesn't work. Write an sql string for updating the original table from the temporary table. Precondition: supportsTempTables() == true. Precondition: pkFields and assignFields don't intersect.- Overrides:
writeUpdateOriginalFromTempTableSqlin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Parameters:
writer- for writing the sqltable- is original table for which temp table is created.pkFields- - primary key fields for the original table.assignedFields- - fields to be assigned a new value.- Throws:
IOException
-
printFieldIdentityClause
INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.- Overrides:
printFieldIdentityClausein classDB2Platform- Throws:
ValidationException
-
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 classDB2Platform
-
setNullFromDatabaseField
protected void setNullFromDatabaseField(org.eclipse.persistence.internal.helper.DatabaseField databaseField, PreparedStatement statement, int index) throws SQLException - Overrides:
setNullFromDatabaseFieldin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
SQLException
-
initializePlatformOperators
protected void initializePlatformOperators()Initialize any platform-specific operators- Overrides:
initializePlatformOperatorsin classDB2Platform
-
avgOperator
Disable binding support.With binding enabled, Derby will throw an error:
ERROR 42X36: The 'AVG' operator is not allowed to take a ? parameter as an operand.
-
sumOperator
Disable binding support.With binding enabled, Derby will throw an error:
ERROR 42X36: The 'SUM' operator is not allowed to take a ? parameter as an operand.
-
equalOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '=' to be ? parameters.
-
notEqualOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '<>' to be ? parameters.
-
greaterThanOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '>' to be ? parameters.
-
greaterThanEqualOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '>=' to be ? parameters.
-
lessThanOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '<' to be ? parameters.
-
lessThanEqualOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '<=' to be ? parameters.
-
extractOperator
INTERNAL: Derby does not support EXTRACT, but does have YEAR, MONTH, DAY, etc. -
addOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '+' to be ? parameters.
-
subtractOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '-' to be ? parameters.
-
multiplyOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '*' to be ? parameters.
-
divideOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '/' to be ? parameters.
-
concatOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of '||' to be ? parameters.
- Overrides:
concatOperatorin classDB2Platform
-
trim2
Enable binding support.With binding enabled, Derby does not throw an exception
- Overrides:
trim2in classDB2Platform
-
modOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of 'mod' to be ? parameters.
-
ltrim2Operator
Enable binding support.With binding enabled, Derby does not throw an exception
- Overrides:
ltrim2Operatorin classDB2Platform
-
rtrim2Operator
Enable binding support.With binding enabled, Derby does not throw an exception
- Overrides:
rtrim2Operatorin classDB2Platform
-
betweenOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of 'BETWEEN' to be ? parameters.
-
notBetweenOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of 'BETWEEN' to be ? parameters.
-
inOperator
Derby requires that at least one argument be a known typeWith binding enabled, Derby will throw an error:
ERROR 42X35: It is not allowed for both operands of 'IN' to be ? parameters.
-
isDynamicSQLRequiredForFunctions
public boolean isDynamicSQLRequiredForFunctions()INTERNAL Derby has some issues with using parameters on certain functions and relations. This allows statements to disable binding, for queries, only in these cases. If users set casting on, then casting is used instead of dynamic SQL.- Overrides:
isDynamicSQLRequiredForFunctionsin classDB2Platform
-
computeMaxRowsForSQL
public int computeMaxRowsForSQL(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. 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 Derby uses case #2 and therefore the maxResults has to be altered based on the firstResultIndex.- Overrides:
computeMaxRowsForSQLin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- See Also:
-
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) INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall. Derby supports pagination through its "OFFSET n ROWS FETCH NEXT m ROWS" syntax.- Overrides:
printSQLSelectStatementin classDB2Platform
-
supportsSequenceObjects
public boolean supportsSequenceObjects()INTERNAL: Derby supports sequence objects as of 10.6.1.- Overrides:
supportsSequenceObjectsin classDB2Platform
-
isAlterSequenceObjectSupported
public boolean isAlterSequenceObjectSupported()Description copied from class:DB2PlatformINTERNAL: DB2 added SEQUENCE support as of (I believe) v8.- Overrides:
isAlterSequenceObjectSupportedin classDB2Platform
-
buildSequenceObjectDeletionWriter
public Writer buildSequenceObjectDeletionWriter(Writer writer, String fullSeqName) throws IOException INTERNAL: Derby supports sequence objects as of 10.6.1.- Overrides:
buildSequenceObjectDeletionWriterin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
IOException
-
initializeConnectionData
INTERNAL:- Overrides:
initializeConnectionDatain classDB2Platform- Throws:
SQLException
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException INTERNAL Set the parameter in the JDBC statement at the given index. This support a wide range of different parameter types, and is heavily optimized for common types.- Overrides:
setParameterValueInDatabaseCallin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
SQLException
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException INTERNAL 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 classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
SQLException
-
appendParameterInternal
Returns the number of parameters that used binding. Should only be called in case binding is not used.- Overrides:
appendParameterInternalin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-