org.hibernate.dialect

Class FirebirdDialect


public class FirebirdDialect
extends InterbaseDialect

An SQL dialect for Firebird.
Author:
Reha CENANI

Field Summary

Fields inherited from class org.hibernate.dialect.Dialect

CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE

Method Summary

boolean
bindLimitParametersFirst()
Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
boolean
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
String
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command.
String
getLimitString(String sql, boolean hasOffset)
Apply s limit clause to the query.

Methods inherited from class org.hibernate.dialect.InterbaseDialect

bindLimitParametersFirst, bindLimitParametersInReverseOrder, getAddColumnString, getCreateSequenceString, getCurrentTimestampCallString, getDropSequenceString, getForUpdateString, getForUpdateString, getLimitString, getQuerySequencesString, getSelectSequenceNextValString, getSequenceNextValString, isCurrentTimestampSelectStringCallable, supportsLimit, supportsSequences

Methods inherited from class org.hibernate.dialect.Dialect

appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, dropTemporaryTableAfterUse, forUpdateOfColumns, generateTemporaryTableName, getAddColumnString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSQLFunctionName, getCurrentTimestampSelectString, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLimitString, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimit, supportsLimitOffset, supportsLobValueChangePropogation, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporaryTables, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob, useMaxForLimit

Method Details

bindLimitParametersFirst

public boolean bindLimitParametersFirst()
Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
Overrides:
bindLimitParametersFirst in interface InterbaseDialect
Returns:
true if limit parameters should come before other parameters

bindLimitParametersInReverseOrder

public boolean bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. Does this dialect require us to bind the parameters in reverse order?
Overrides:
bindLimitParametersInReverseOrder in interface InterbaseDialect
Returns:
true if the correct order is limit, offset

getDropSequenceString

public String getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of Dialect.getDropSequenceStrings(String) to help facilitate that.

Dialects which support sequences and can drop a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to drop a sequence should instead override Dialect.getDropSequenceStrings(String).

Overrides:
getDropSequenceString in interface InterbaseDialect
Parameters:
sequenceName - The name of the sequence
Returns:
The sequence drop commands

getLimitString

public String getLimitString(String sql,
                             boolean hasOffset)
Apply s limit clause to the query.

Typically dialects utilize variable limit caluses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offest since we will just be using placeholders.

Here we do still pass along whether or not an offset was specified so that dialects not supporting offsets can generate proper exceptions. In general, dialects will override one or the other of this method and Dialect.getLimitString(String,int,int).

Overrides:
getLimitString in interface InterbaseDialect
Parameters:
hasOffset - Is the query requesting an offset?
Returns:
the modified SQL