public class HSQLPlatform extends DatabasePlatform
Purpose: Provides HSQL specific behavior. Support HSQL functionality as of 1.8.1.
Includes:
DEFAULT_VARCHAR_SIZE
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, shouldIgnoreCaseOnFieldComparisons, Types_NCLOB, Types_SQLXML
Constructor and Description |
---|
HSQLPlatform() |
Modifier and Type | Method and Description |
---|---|
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL:
Returns query used to read back the value generated by Identity.
|
ValueReadQuery |
buildSelectQueryForSequenceObject(java.lang.String seqName,
java.lang.Integer size)
INTERNAL:
Returns query used to read value generated by sequence object (like Oracle sequence).
|
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.
|
ValueReadQuery |
getTimestampQuery()
This method can be overridden by subclasses to return a
query that will return the timestamp from the server.
|
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(java.io.Writer writer)
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printSQLSelectStatement(DatabaseCall call,
ExpressionSQLPrinter printer,
SQLSelectStatement statement)
Print the pagination SQL using HSQL syntax "SELECT LIMIT <first> <max>".
|
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(java.io.Writer writer,
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, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, 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, 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, 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, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, 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, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsAutoConversionToNumericForArithmeticOperations, supportsConnectionUserName, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsStoredFunctions, supportsTempTables, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix
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, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence
public static ExpressionOperator toNumberOperator()
public static ExpressionOperator trimOperator()
public boolean isHSQL()
isHSQL
in interface Platform
isHSQL
in class DatasourcePlatform
public boolean supportsUniqueColumns()
supportsUniqueColumns
in class DatabasePlatform
public boolean supportsIdentity()
DatasourcePlatform
supportsIdentity
in class DatasourcePlatform
public ValueReadQuery buildSelectQueryForIdentity()
DatasourcePlatform
buildSelectQueryForIdentity
in class DatasourcePlatform
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
DatabasePlatform
printFieldIdentityClause
in class DatabasePlatform
ValidationException
public boolean isDynamicSQLRequiredForFunctions()
isDynamicSQLRequiredForFunctions
in class DatabasePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax
in class DatabasePlatform
public boolean supportsNestingOuterJoins()
supportsNestingOuterJoins
in class DatabasePlatform
public boolean supportsSequenceObjects()
DatasourcePlatform
supportsSequenceObjects
in class DatasourcePlatform
public boolean isAlterSequenceObjectSupported()
DatabasePlatform
isAlterSequenceObjectSupported
in class DatabasePlatform
public ValueReadQuery buildSelectQueryForSequenceObject(java.lang.String seqName, java.lang.Integer size)
DatasourcePlatform
buildSelectQueryForSequenceObject
in class DatasourcePlatform
public boolean supportsGlobalTempTables()
DatabasePlatform
supportsGlobalTempTables
in class DatabasePlatform
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
writeUpdateOriginalFromTempTableSql
in class DatabasePlatform
java.io.IOException
public int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
computeMaxRowsForSQL
in class DatabasePlatform
MySQLPlatform
public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement)
printSQLSelectStatement
in class DatabasePlatform
public ValueReadQuery getTimestampQuery()
DatasourcePlatform
getTimestampQuery
in interface Platform
getTimestampQuery
in class DatasourcePlatform
public java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment, int start) throws java.io.IOException
buildSequenceObjectCreationWriter
in class DatabasePlatform
java.io.IOException
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference