|
EclipseLink 2.5.3, build 'v20180808-e38c757' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.InformixPlatform
org.eclipse.persistence.platform.database.Informix11Platform
public class Informix11Platform
An InformixPlatform that fixes many EclipseLink bugs
related to Informix support.
| 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, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useJDBCStoredProcedureSyntax, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding |
| Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
|---|
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery |
| Constructor Summary | |
|---|---|
Informix11Platform()
Creates a new JenzabarInformixPlatform. |
|
| Method Summary | |||||||
|---|---|---|---|---|---|---|---|
protected void |
appendBoolean(java.lang.Boolean booleanValue,
java.io.Writer writer)
Fixes |
protected ExpressionOperator |
currentDateOperator()
Fixes |
protected ExpressionOperator |
currentTimeOperator()
Fixes |
boolean |
dontBindUpdateAllQueryUsingTempTables()
Returns true when invoked to indicate that parameter
binding must not be used when working with temporary
tables as part of an UPDATE query. |
protected java.lang.String |
getCreateTempTableSqlPrefix()
Returns CREATE TEMP TABLE when invoked, per
the Informix
11.70 Information Center documentation. |
||||||
protected java.lang.String |
getCreateTempTableSqlSuffix()
Returns WITH NO LOG when invoked, per the Informix
11.70 Information Center documentation, since transactions
are not needed on temp tables for the purposes for which
EclipseLink uses them. |
||||||
java.lang.Object |
getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int jdbcType,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Overrides DatabasePlatform.getObjectFromResultSet(ResultSet,
int, int, AbstractSession) so that if the supplied jdbcType is equal to Types.LONGVARCHAR, then the ResultSet.getString(int) method (instead of the ResultSet.getObject(int) method) is used to fetch the "raw"
value of the column indicated by the supplied columnNumber from the supplied ResultSet. |
||||||
org.eclipse.persistence.internal.helper.DatabaseTable |
getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
Overrides the superclass implementation to return a new DatabaseTable with no DatabaseTable.getTableQualifier(). |
||||||
protected void |
initializePlatformOperators()
Fixes |
boolean |
isInformixOuterJoin()
Overrides the default behavior to return false,
indicating that ANSI OUTER JOIN syntax should be used,
since all modern versions of Informix support it. |
||||
boolean |
shouldAlwaysUseTempStorageForModifyAll()
Returns true when invoked to force Informix to use
temporary storage when constructing bulk UPDATE
statements. |
||||||
boolean |
supportsLocalTempTables()
Returns true when invoked to indicate that Informix does
indeed support local temporary tables. |
||||||
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
Overrides DatabasePlatform.writeUpdateOriginalFromTempTableSql(Writer,
DatabaseTable, Collection, Collection) to ensure that a SET clause that is supposed to set a value for only one column
does not wrap that column name in parentheses. |
||||||
| Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
|---|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendByteArray, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printSQLSelectStatement, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseJDBCOuterJoinSyntax, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffix |
| Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
|---|
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Informix11Platform()
JenzabarInformixPlatform. Calls DatabasePlatform.setShouldBindLiterals(boolean) with false as a
parameter value.
| Method Detail |
|---|
protected void initializePlatformOperators()
Distinct ExpressionOperator is set to print as DISTINCT (no parentheses, one trailing space), and fixes
EclipseLink
bug 402953 by adding
platform operators for current date and current time.
initializePlatformOperators in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformcurrentDateOperator(),
currentTimeOperator(),
EclipseLink
bug 402600,
EclipseLink
bug 402953protected ExpressionOperator currentDateOperator()
ExpressionOperator.simpleFunctionNoParentheses(ExpressionOperator.CurrentDate,
"CURRENT YEAR TO DAY");
null ExpressionOperatorprotected ExpressionOperator currentTimeOperator()
ExpressionOperator.simpleFunctionNoParentheses(ExpressionOperator.CurrentDate,
"CURRENT YEAR TO FRACTION(3)");
null ExpressionOperator
EclipseLink
bug 402953public boolean isInformixOuterJoin()
false,
indicating that ANSI OUTER JOIN syntax should be used,
since all modern versions of Informix support it.
isInformixOuterJoin in class InformixPlatformfalse when invoked
protected void appendBoolean(java.lang.Boolean booleanValue,
java.io.Writer writer)
throws java.io.IOException
't' or 'f'—with single quotes— instead of 1 or
0.
appendBoolean in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformbooleanValue - a non-null Boolean to appendwriter - a non-null Writer to append the
literal value to
java.lang.IllegalArgumentException - if either booleanValue or writer is null
java.io.IOException - if the supplied Writer throws an
IOExceptionpublic boolean dontBindUpdateAllQueryUsingTempTables()
true when invoked to indicate that parameter
binding must not be used when working with temporary
tables as part of an UPDATE query.
Parsing the English is a little difficult in this method name. It means: "Do not bind parameters in queries that are part of an overall 'update all' operation where temporary tables are being used."
dontBindUpdateAllQueryUsingTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformtrue when invokedpublic boolean shouldAlwaysUseTempStorageForModifyAll()
true when invoked to force Informix to use
temporary storage when constructing bulk UPDATE
statements.
shouldAlwaysUseTempStorageForModifyAll in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformtrue in all casespublic boolean supportsLocalTempTables()
true when invoked to indicate that Informix does
indeed support local temporary tables.
local is defined by EclipseLink in DatabasePlatform
to mean:
"Local" means that several threads may create
temporary tables with the same name.
Local temporary table is created in the beginning of UpdateAllQuery
execution and dropped in the end of it.
supportsLocalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformtrue when invokedprotected java.lang.String getCreateTempTableSqlPrefix()
CREATE TEMP TABLE when invoked, per
the Informix
11.70 Information Center documentation.
While Informix 11.70 supports an additional IF NOT
EXISTS clause, Informix 11.50 does not, so this method does not
add the IF NOT EXISTS clause. In practice this should be
fine as temporary tables are scoped to the Informix session, and
EclipseLink takes care of cleaning up any temporary tables that
it creates.
getCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformCREATE TEMP TABLE when invokedpublic org.eclipse.persistence.internal.helper.DatabaseTable getTempTableForTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
DatabaseTable with no DatabaseTable.getTableQualifier(). Informix 11.50 and above do
not support table qualifiers of any kind on temporary tables.
getTempTableForTable in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformtable - the DatabaseTable for which a temporary
DatabaseTable should be returned; must not be null
DatabaseTable with no table qualifier
java.lang.IllegalArgumentException - if table is nullprotected java.lang.String getCreateTempTableSqlSuffix()
WITH NO LOG when invoked, per the Informix
11.70 Information Center documentation, since transactions
are not needed on temp tables for the purposes for which
EclipseLink uses them.
getCreateTempTableSqlSuffix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformWITH NO LOG when invoked
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
throws java.io.IOException
DatabasePlatform.writeUpdateOriginalFromTempTableSql(Writer,
DatabaseTable, Collection, Collection) to ensure that a SET clause that is supposed to set a value for only one column
does not wrap that column name in parentheses.
The code for this method is identical to that of the stock
H2Platform, since the H2 database has the same
requirement.
writeUpdateOriginalFromTempTableSql in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformwriter - the Writer that will be writing SQL; must
not be nulltable - the DatabaseTable to be updated; must not be
nullpkFields - a Collection of DatabaseFields
each of which is a primary key of the table to be updated; must
not be nullassignedFields - a Collection of DatabaseFields that are receiving updated values; must not be
null
java.io.IOException - if an input/output error is thrown by the
supplied Writer
java.lang.NullPointerException - if any of the supplied parameters
is null
public java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int jdbcType,
org.eclipse.persistence.internal.sessions.AbstractSession session)
throws java.sql.SQLException
DatabasePlatform.getObjectFromResultSet(ResultSet,
int, int, AbstractSession) so that if the supplied jdbcType is equal to Types.LONGVARCHAR, then the ResultSet.getString(int) method (instead of the ResultSet.getObject(int) method) is used to fetch the "raw"
value of the column indicated by the supplied columnNumber from the supplied ResultSet.
This works around an issue with the Informix JDBC driver,
version 3.70.JC7 and earlier, where a TEXT column is
reported to be mappable to the JDBC type of LONGVARCHAR, but the actual object returned by
ResultSet.getObject(int) is a byte[] (instead of
either a char[] or a String). Invoking ResultSet.getString(int) instead returns the desired result.
getObjectFromResultSet in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformresultSet - the ResultSet to get an Object from; may be
nullcolumnNumber - the 1-based column number indicating
the column to usejdbcType - an int indicating the JDBC type of which the column in the ResultSet indicated
by the supplied columnNumber is expected to besession - an AbstractSession that, when used at all,
is passed to the superclass implementation of this method; may be
null
Object resulting from a call to ResultSet.getObject(int); may be null
java.sql.SQLException - if any error occurs
|
EclipseLink 2.5.3, build 'v20180808-e38c757' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||