public class HSQLPlatform extends DatabasePlatform
Purpose: Provides HSQL specific behavior. Support HSQL functionality as of 1.8.1.
Includes:
DEFAULT_VARCHAR_SIZEbatchWritingMechanism, 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, usesStringBindingconversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery| Constructor and Description |
|---|
HSQLPlatform() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Hashtable |
buildFieldTypes() |
ValueReadQuery |
buildSelectQueryForIdentity() |
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String seqName,
java.lang.Integer size) |
java.io.Writer |
buildSequenceObjectCreationWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment,
int start)
INTERNAL:
HSQL requires START WITH first.
|
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.
|
protected java.lang.String |
getCreateTempTableSqlPrefix() |
ValueReadQuery |
getTimestampQuery() |
protected ExpressionOperator |
greatest()
INTERNAL:
Build HSQL equivalent to GREATEST(x, y)
HSQL: CASE WHEN x >= y THEN x ELSE y
|
protected void |
initializePlatformOperators() |
boolean |
isAlterSequenceObjectSupported() |
boolean |
isDynamicSQLRequiredForFunctions()
INTERNAL
HSQL has some issues with using parameters on certain functions and relations.
|
boolean |
isHSQL() |
void |
printFieldIdentityClause(java.io.Writer writer) |
void |
printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
Print the pagination SQL using HSQL syntax "SELECT LIMIT
|
protected ExpressionOperator |
rightTrim2()
INTERNAL:
Build HSQL equivalent to RTRIM(string_exp, character).
|
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC escape syntax for outer joins is not supported (not required).
|
boolean |
supportsGlobalTempTables() |
boolean |
supportsIdentity() |
boolean |
supportsNestingOuterJoins()
Does not allow nesting outer joins, i.e. each join must be followed by the ON clause.
|
boolean |
supportsSequenceObjects() |
boolean |
supportsUniqueColumns()
HSQL (1.8.1) does not support the UNIQUE key word in a column, but does support unique constraints defined separately.
|
static ExpressionOperator |
toNumberOperator()
INTERNAL:
Use CONVERT function for toNumber.
|
static ExpressionOperator |
trimOperator()
INTERNAL:
Use TRIM(FROM ?)
|
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
INTERNAL:
HSQL does not allow multiple fields to be set as a list, so each field needs to be set one by one.
|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendBoolean, appendByteArray, appendCalendar, appendDate, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, appendTime, appendTimestamp, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureCallTail, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, initializeConnectionData, isCastRequired, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, 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, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeTableCreationSuffixaddOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isInformix, 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, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequenceprotected java.util.Hashtable buildFieldTypes()
buildFieldTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformprotected void initializePlatformOperators()
initializePlatformOperators in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic static ExpressionOperator toNumberOperator()
public static ExpressionOperator trimOperator()
protected ExpressionOperator rightTrim2()
protected ExpressionOperator greatest()
public boolean isHSQL()
isHSQL in interface org.eclipse.persistence.internal.databaseaccess.PlatformisHSQL in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean supportsUniqueColumns()
supportsUniqueColumns in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsIdentity()
supportsIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic void printFieldIdentityClause(java.io.Writer writer)
throws ValidationException
printFieldIdentityClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformValidationExceptionpublic boolean isDynamicSQLRequiredForFunctions()
isDynamicSQLRequiredForFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsNestingOuterJoins()
supportsNestingOuterJoins in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsSequenceObjects()
supportsSequenceObjects in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean isAlterSequenceObjectSupported()
isAlterSequenceObjectSupported in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
buildSelectQueryForSequenceObject in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean supportsGlobalTempTables()
supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformprotected java.lang.String getCreateTempTableSqlPrefix()
getCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic 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
writeUpdateOriginalFromTempTableSql in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformjava.io.IOExceptionpublic int computeMaxRowsForSQL(int firstResultIndex,
int maxResults)
computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic 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.DatabasePlatformpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.PlatformgetTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment,
int start)
throws java.io.IOException
buildSequenceObjectCreationWriter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformjava.io.IOException