public class IngresDialect extends Dialect
An SQL dialect for Ingres 9.2.
<p/>
Known limitations: <ul>
<li>
Only supports simple constants or columns on the left side of an IN,
making (1,2,3) in (…​) or (subselect) in (…​) non-supported.
</li>
<li>
Supports only 39 digits in decimal.
</li>
<li>
Explicitly set USE_GET_GENERATED_KEYS property to false.
</li>
<li>
Perform string casts to varchar; removes space padding.
</li>
</ul>
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY| Constructor and Description |
|---|
IngresDialect()
Constructs a IngresDialect
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence
with a single command.
|
String |
getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the
current timestamp.
|
protected LimitHandler |
getDefaultLimitHandler() |
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence
with a single command.
|
LimitHandler |
getLimitHandler()
Returns the delegate managing LIMIT clause.
|
String |
getLimitString(String querySelect,
int offset,
int limit)
Given a limit and an offset, apply the limit clause to the query.
|
String |
getLowercaseFunction()
The name of the SQL function that transforms a string to
lowercase
|
String |
getNullColumnString()
The keyword used to specify a nullable column.
|
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
|
String |
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.
|
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
|
String |
getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retrieve the next value
of a sequence.
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
<p/>
For example, is [where XYZ in ()] a supported construct?
|
boolean |
supportsExpectedLobUsagePattern()
Expected LOB usage pattern is such that I can perform an insert
via prepared statement with a parameter binding for a LOB value
without crazy casting to JDBC driver implementation-specific classes…
<p/>
Part of the trickiness here is the fact that this is largely
driver dependent.
|
boolean |
supportsLimit()
Does this dialect support some form of limiting query results
via a SQL clause?
|
boolean |
supportsLimitOffset()
Does this dialect’s LIMIT support (if any) additionally
support specifying an offset?
|
boolean |
supportsSequences()
Does this dialect support sequences?
|
boolean |
supportsSubselectAsInPredicateLHS()
Are subselects supported as the left-hand-side (LHS) of
IN-predicates.
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support
count(distinct a,b)? |
boolean |
supportsVariableLimit()
Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
|
boolean |
useMaxForLimit()
Does the <tt>LIMIT</tt> clause take a "maximum" row number instead
of a total number of returned rows?
<p/>
This is easiest understood via an example.
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSelectString, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnSupport, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNotExpression, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlobpublic String getSelectGUIDString()
DialectGet the command used to select a GUID from the underlying database. <p/> Optional operation.
getSelectGUIDString in class Dialectpublic boolean dropConstraints()
DialectDo we need to drop constraints before dropping tables in this dialect?
dropConstraints in class Dialectpublic String getAddColumnString()
DialectThe syntax used to add a column to a table (optional).
getAddColumnString in class Dialectpublic String getNullColumnString()
DialectThe keyword used to specify a nullable column.
getNullColumnString in class Dialectpublic boolean supportsSequences()
DialectDoes this dialect support sequences?
supportsSequences in class Dialectpublic String getSequenceNextValString(String sequenceName)
DialectGenerate the appropriate select statement to to retrieve the next value of a sequence. <p/> This should be a "stand alone" select statement.
getSequenceNextValString in class DialectsequenceName - the name of the sequencepublic String getSelectSequenceNextValString(String sequenceName)
DialectGenerate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
<p/>
This differs from Dialect.getSequenceNextValString(String) in that this
should return an expression usable within another statement.
getSelectSequenceNextValString in class DialectsequenceName - the name of the sequencepublic String getCreateSequenceString(String sequenceName)
DialectTypically dialects which support sequences can create a sequence
with a single command. This is convenience form of
Dialect.getCreateSequenceStrings(java.lang.String) to help facilitate that.
<p/>
Dialects which support sequences and can create a sequence in a
single command need only override this method. Dialects
which support sequences but require multiple commands to create
a sequence should instead override Dialect.getCreateSequenceStrings(java.lang.String).
getCreateSequenceString in class DialectsequenceName - The name of the sequencepublic String getDropSequenceString(String sequenceName)
DialectTypically dialects which support sequences can drop a sequence
with a single command. This is convenience form of
Dialect.getDropSequenceStrings(java.lang.String) to help facilitate that.
<p/>
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(java.lang.String).
getDropSequenceString in class DialectsequenceName - The name of the sequencepublic String getQuerySequencesString()
DialectGet the select command used retrieve the names of all sequences.
getQuerySequencesString in class DialectSchemaUpdatepublic String getLowercaseFunction()
DialectThe name of the SQL function that transforms a string to lowercase
getLowercaseFunction in class Dialectpublic LimitHandler getLimitHandler()
DialectReturns the delegate managing LIMIT clause.
getLimitHandler in class Dialectprotected LimitHandler getDefaultLimitHandler()
public boolean supportsLimit()
DialectDoes this dialect support some form of limiting query results via a SQL clause?
supportsLimit in class Dialectpublic boolean supportsLimitOffset()
DialectDoes this dialect’s LIMIT support (if any) additionally support specifying an offset?
supportsLimitOffset in class Dialectpublic String getLimitString(String querySelect, int offset, int limit)
DialectGiven a limit and an offset, apply the limit clause to the query.
getLimitString in class DialectquerySelect - The query to which to apply the limit.offset - The offset of the limitlimit - The limit of the limit ;)public boolean supportsVariableLimit()
DialectDoes this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
supportsVariableLimit in class Dialectpublic boolean useMaxForLimit()
DialectDoes the <tt>LIMIT</tt> clause take a "maximum" row number instead of a total number of returned rows? <p/> This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9) <p/> So essentially, is limit relative from offset? Or is limit absolute?
useMaxForLimit in class Dialectpublic MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy in class Dialectpublic String getCurrentTimestampSQLFunctionName()
DialectThe name of the database-specific SQL function for retrieving the current timestamp.
getCurrentTimestampSQLFunctionName in class Dialectpublic boolean supportsSubselectAsInPredicateLHS()
DialectAre subselects supported as the left-hand-side (LHS) of IN-predicates. <p/> In other words, is syntax like "… <subquery> IN (1, 2, 3) …" supported?
supportsSubselectAsInPredicateLHS in class Dialectpublic boolean supportsEmptyInList()
DialectDoes this dialect support empty IN lists? <p/> For example, is [where XYZ in ()] a supported construct?
supportsEmptyInList in class Dialectpublic boolean supportsExpectedLobUsagePattern()
DialectExpected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes… <p/> Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers…
supportsExpectedLobUsagePattern in class Dialectpublic boolean supportsTupleDistinctCounts()
DialectDoes this dialect support count(distinct a,b)?
supportsTupleDistinctCounts in class DialectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.