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, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBindingconversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery| Constructor and Description |
|---|
HSQLPlatform() |
| Modifier and Type | Method and Description |
|---|---|
protected Hashtable |
buildFieldTypes()
Return the mapping of class types to database types for the schema framework.
|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL:
Returns query used to read back the value generated by Identity.
|
ValueReadQuery |
buildSelectQueryForSequenceObject(String seqName,
Integer size)
INTERNAL:
Returns query used to read value generated by sequence object (like Oracle sequence).
|
Writer |
buildSequenceObjectCreationWriter(Writer writer,
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 String |
getCreateTempTableSqlPrefix()
INTERNAL:
Override this method if the platform supports temporary tables.
|
ValueReadQuery |
getTimestampQuery()
This method can be overridden by subclasses to return a
query that will return the timestamp from the server.
|
protected ExpressionOperator |
greatest()
INTERNAL:
Build HSQL equivalent to GREATEST(x, y)
HSQL: CASE WHEN x >= y THEN x ELSE y
|
protected void |
initializePlatformOperators()
Initialize any platform-specific operators
|
boolean |
isAlterSequenceObjectSupported()
INTERNAL:
Override this method if the platform supports sequence objects
and it's possible to alter sequence object's increment in the database.
|
boolean |
isDynamicSQLRequiredForFunctions()
INTERNAL
HSQL has some issues with using parameters on certain functions and relations.
|
boolean |
isHSQL() |
void |
printFieldIdentityClause(Writer writer)
Append the receiver's field 'identity' constraint clause to a 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 <first> <max>".
|
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()
INTERNAL:
Indicates whether the platform supports global temporary tables.
|
boolean |
supportsIdentity()
INTERNAL:
Indicates whether the platform supports identity.
|
boolean |
supportsNestingOuterJoins()
Does not allow nesting outer joins, i.e.
|
boolean |
supportsSequenceObjects()
INTERNAL:
Indicates whether the platform supports sequence objects.
|
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 ?) function for trim.
|
void |
writeUpdateOriginalFromTempTableSql(Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
Collection pkFields,
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, checkTableExists, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getDropDatabaseSchemaString, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureCallHeader, getProcedureCallTail, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTableExistsQuery, getTempTableForTable, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, 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, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setNullFromDatabaseField, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, 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, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueKeyConstraints, supportsVPD, supportsWaitForUpdate, 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, 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, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, 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, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequenceprotected Hashtable buildFieldTypes()
org.eclipse.persistence.internal.databaseaccess.DatabasePlatformbuildFieldTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformprotected void initializePlatformOperators()
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatforminitializePlatformOperators 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()
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformsupportsIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic ValueReadQuery buildSelectQueryForIdentity()
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformbuildSelectQueryForIdentity in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic void printFieldIdentityClause(Writer writer) throws ValidationException
org.eclipse.persistence.internal.databaseaccess.DatabasePlatformprintFieldIdentityClause 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()
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformsupportsSequenceObjects in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean isAlterSequenceObjectSupported()
org.eclipse.persistence.internal.databaseaccess.DatabasePlatformisAlterSequenceObjectSupported in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ValueReadQuery buildSelectQueryForSequenceObject(String seqName, Integer size)
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformbuildSelectQueryForSequenceObject in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean supportsGlobalTempTables()
org.eclipse.persistence.internal.databaseaccess.DatabasePlatformsupportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformprotected String getCreateTempTableSqlPrefix()
org.eclipse.persistence.internal.databaseaccess.DatabasePlatformgetCreateTempTableSqlPrefix in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic void writeUpdateOriginalFromTempTableSql(Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException
writeUpdateOriginalFromTempTableSql in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformwriter - 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.IOExceptionpublic int computeMaxRowsForSQL(int firstResultIndex,
int maxResults)
computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformMySQLPlatformpublic 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()
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformgetTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.PlatformgetTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic Writer buildSequenceObjectCreationWriter(Writer writer, String fullSeqName, int increment, int start) throws IOException
buildSequenceObjectCreationWriter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformIOExceptionCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.