public class PostgreSQL81Dialect extends Dialect
An SQL dialect for Postgres <p/> For discussion of BLOB support in Postgres, as of 8.4, have a peek at <a href="http://jdbc.postgresql.org/documentation/84/binary-data.html">http://jdbc.postgresql.org/documentation/84/binary-data.html</a>. For the effects in regards to Hibernate see <a href="http://in.relation.to/15492.lace">http://in.relation.to/15492.lace</a>
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 |
---|
PostgreSQL81Dialect()
Constructs a PostgreSQL81Dialect
|
Modifier and Type | Method and Description |
---|---|
boolean |
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
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).
|
CallableStatementSupport |
getCallableStatementSupport() |
String |
getCascadeConstraintsString()
Completely optional cascading drop clause
|
String |
getCaseInsensitiveLike()
The name of the SQL function that can do case insensitive <b>like</b> comparison.
|
String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence
with a single command.
|
protected String |
getCreateSequenceString(String sequenceName,
int initialValue,
int incrementSize)
only necessary for postgre < 7.4 See http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_sequence.sgml
<p/>
Overloaded form of
Dialect.getCreateSequenceString(String) , additionally
taking the initial value and increment size to be applied to the sequence
definition. |
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the
database.
|
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence
with a single command.
|
String |
getForUpdateNowaitString()
Retrieves the <tt>FOR UPDATE NOWAIT</tt> syntax specific to this dialect.
|
String |
getForUpdateNowaitString(String aliases)
Get the <tt>FOR UPDATE OF column_list NOWAIT</tt> fragment appropriate
for this dialect given the aliases of the columns to be write locked.
|
String |
getForUpdateString()
Get the string to append to SELECT statements to acquire locks
for this dialect.
|
String |
getForUpdateString(String aliases)
Get the <tt>FOR UPDATE OF column_list</tt> fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
String |
getForUpdateString(String aliases,
LockOptions lockOptions)
Get the <tt>FOR UPDATE OF column_list</tt> fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
IdentityColumnSupport |
getIdentityColumnSupport()
Get the appropriate
IdentityColumnSupport |
LimitHandler |
getLimitHandler()
Returns the delegate managing LIMIT clause.
|
String |
getLimitString(String sql,
boolean hasOffset)
Apply s limit clause to the query.
|
String |
getNativeIdentifierGeneratorStrategy()
Resolves the native generation strategy associated to this dialect.
|
String |
getNoColumnsInsertString()
The fragment used to insert a row without specifying any column values.
|
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
|
String |
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect.
|
String |
getReadLockString(String aliases,
int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect given the aliases of the columns to be read locked.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int) ,
extract the ResultSet from the OUT parameter. |
ResultSet |
getResultSet(CallableStatement statement,
int position)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int) ,
extract the ResultSet . |
ResultSet |
getResultSet(CallableStatement statement,
String name)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int) ,
extract the ResultSet from the OUT parameter. |
String |
getSelectClauseNullString(int sqlType)
Workaround for postgres bug #1453
<p/>
Given a
Types type code, determine an appropriate
null value to use in a select clause. |
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.
|
SqlTypeDescriptor |
getSqlTypeDescriptorOverride(int sqlCode)
Returns the
SqlTypeDescriptor that should be used to handle the given JDBC type code. |
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter() |
String |
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
String |
getWriteLockString(String aliases,
int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect given the aliases of the columns to be write locked.
|
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet by position. |
boolean |
requiresParensForTupleDistinctCounts()
If
Dialect.supportsTupleDistinctCounts() is true, does the Dialect require the tuple to be wrapped with parens? |
boolean |
supportsCaseInsensitiveLike()
Does this dialect support case insensitive LIKE restrictions?
|
boolean |
supportsCommentOn()
Does this dialect/database support commenting on tables, columns, etc?
|
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database’s current
timestamp value?
|
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 |
supportsLobValueChangePropogation()
Does the dialect support propagating changes to LOB
values back to the database? Talking about mutating the
internal value of the locator as opposed to supplying a new
locator instance…
<p/>
For BLOBs, the internal value might be changed by:
Blob.setBinaryStream(long) ,
Blob.setBytes(long, byte[]) ,
Blob.setBytes(long, byte[], int, int) ,
or Blob.truncate(long) . |
boolean |
supportsNationalizedTypes()
Does this dialect supports Nationalized Types
|
boolean |
supportsOuterJoinForUpdate()
Does this dialect support <tt>FOR UPDATE</tt> in conjunction with
outer joined rows?
|
boolean |
supportsPooledSequences()
Does this dialect support "pooled" sequences.
|
boolean |
supportsRowValueConstructorSyntax()
Is this dialect known to support what ANSI-SQL terms "row value
constructor" syntax; sometimes called tuple syntax.
|
boolean |
supportsSequences()
Does this dialect support sequences?
|
boolean |
supportsUnboundedLobLocatorMaterialization()
Is it supported to materialize a LOB locator outside the transaction in
which it was created?
<p/>
Again, part of the trickiness here is the fact that this is largely
driver dependent.
|
boolean |
supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
String |
toBooleanValueString(boolean bool)
The SQL literal value to which this database maps boolean values.
|
boolean |
useInputStreamToInsertBlob()
Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, buildIdentifierHelper, 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, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNotExpression, getNullColumnString, getQueryHintString, getQueryHintString, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExistsInSelect, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimitOffset, supportsLockTimeouts, supportsNamedParameters, supportsNonQueryWithCTE, supportsNotNullUnique, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useMaxForLimit
public PostgreSQL81Dialect()
Constructs a PostgreSQL81Dialect
public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
Dialect
Returns the SqlTypeDescriptor
that should be used to handle the given JDBC type code. Returns
null
if there is no override.
getSqlTypeDescriptorOverride
in class Dialect
sqlCode
- A Types
constant indicating the SQL column typeSqlTypeDescriptor
to use as an override, or null
if there is no override.public String getAddColumnString()
Dialect
The syntax used to add a column to a table (optional).
getAddColumnString
in class Dialect
public String getSequenceNextValString(String sequenceName)
Dialect
Generate 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 Dialect
sequenceName
- the name of the sequencepublic String getSelectSequenceNextValString(String sequenceName)
Dialect
Generate 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 Dialect
sequenceName
- the name of the sequencepublic String getCreateSequenceString(String sequenceName)
Dialect
Typically 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 Dialect
sequenceName
- The name of the sequencepublic String getDropSequenceString(String sequenceName)
Dialect
Typically 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 Dialect
sequenceName
- The name of the sequencepublic String getCascadeConstraintsString()
Dialect
Completely optional cascading drop clause
getCascadeConstraintsString
in class Dialect
public boolean dropConstraints()
Dialect
Do we need to drop constraints before dropping tables in this dialect?
dropConstraints
in class Dialect
public boolean supportsSequences()
Dialect
Does this dialect support sequences?
supportsSequences
in class Dialect
public String getQuerySequencesString()
Dialect
Get the select command used retrieve the names of all sequences.
getQuerySequencesString
in class Dialect
SchemaUpdate
public LimitHandler getLimitHandler()
Dialect
Returns the delegate managing LIMIT clause.
getLimitHandler
in class Dialect
public boolean supportsLimit()
Dialect
Does this dialect support some form of limiting query results via a SQL clause?
supportsLimit
in class Dialect
public String getLimitString(String sql, boolean hasOffset)
Dialect
Apply s limit clause to the query.
<p/>
Typically dialects utilize variable
limit clauses 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.
<p/>
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)
.
getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?public boolean bindLimitParametersInReverseOrder()
Dialect
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?
bindLimitParametersInReverseOrder
in class Dialect
public String getForUpdateString(String aliases)
Dialect
Get the <tt>FOR UPDATE OF column_list</tt> fragment appropriate for this dialect given the aliases of the columns to be write locked.
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateString(String aliases, LockOptions lockOptions)
Dialect
Get the <tt>FOR UPDATE OF column_list</tt> fragment appropriate for this dialect given the aliases of the columns to be write locked.
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.lockOptions
- the lock options to applypublic String getNoColumnsInsertString()
Dialect
The fragment used to insert a row without specifying any column values. This is not possible on some databases.
getNoColumnsInsertString
in class Dialect
public String getCaseInsensitiveLike()
Dialect
The name of the SQL function that can do case insensitive <b>like</b> comparison.
getCaseInsensitiveLike
in class Dialect
public boolean supportsCaseInsensitiveLike()
Dialect
Does this dialect support case insensitive LIKE restrictions?
supportsCaseInsensitiveLike
in class Dialect
true
if the underlying database supports case insensitive like comparison,
false
otherwise. The default is false
.public String getNativeIdentifierGeneratorStrategy()
Dialect
Resolves the native generation strategy associated to this dialect. <p/> Comes into play whenever the user specifies the native generator.
getNativeIdentifierGeneratorStrategy
in class Dialect
public boolean supportsOuterJoinForUpdate()
Dialect
Does this dialect support <tt>FOR UPDATE</tt> in conjunction with outer joined rows?
supportsOuterJoinForUpdate
in class Dialect
public boolean useInputStreamToInsertBlob()
Dialect
Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
PreparedStatement.setBinaryStream(int, java.io.InputStream, int)
).
useInputStreamToInsertBlob
in class Dialect
public boolean supportsUnionAll()
Dialect
Does this dialect support UNION ALL, which is generally a faster variant of UNION?
supportsUnionAll
in class Dialect
public String getSelectClauseNullString(int sqlType)
Workaround for postgres bug #1453 <p/>
Given a Types
type code, determine an appropriate
null value to use in a select clause.
<p/>
One thing to consider here is that certain databases might
require proper casting for the nulls here since the select here
will be part of a UNION/UNION ALL.
getSelectClauseNullString
in class Dialect
sqlType
- The Types
type code.public boolean supportsCommentOn()
Dialect
Does this dialect/database support commenting on tables, columns, etc?
supportsCommentOn
in class Dialect
true
if commenting is supportedpublic MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy
in class Dialect
public boolean supportsCurrentTimestampSelection()
Dialect
Does this dialect support a way to retrieve the database’s current timestamp value?
supportsCurrentTimestampSelection
in class Dialect
public boolean isCurrentTimestampSelectStringCallable()
Dialect
Should the value returned by Dialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used…
isCurrentTimestampSelectStringCallable
in class Dialect
Dialect.getCurrentTimestampSelectString()
return
is callable; false otherwise.public String getCurrentTimestampSelectString()
Dialect
Retrieve the command used to retrieve the current timestamp from the database.
getCurrentTimestampSelectString
in class Dialect
public boolean requiresParensForTupleDistinctCounts()
Dialect
If Dialect.supportsTupleDistinctCounts()
is true, does the Dialect require the tuple to be wrapped with parens?
requiresParensForTupleDistinctCounts
in class Dialect
public String toBooleanValueString(boolean bool)
Dialect
The SQL literal value to which this database maps boolean values.
toBooleanValueString
in class Dialect
bool
- The boolean valuepublic ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter
in interface ConversionContext
getViolatedConstraintNameExtracter
in class Dialect
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Dialect
Build an instance of a SQLExceptionConversionDelegate
for
interpreting dialect-specific error or SQLState codes.
<p/>
When Dialect.buildSQLExceptionConverter()
returns null, the default
SQLExceptionConverter
is used to interpret SQLState and
error codes. If this method is overridden to return a non-null value,
the default SQLExceptionConverter
will use the returned
SQLExceptionConversionDelegate
in addition to the following
standard delegates:
<ol>
<li>a "static" delegate based on the JDBC 4 defined SQLException hierarchy;</li>
<li>a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes,
depending on java.sql.DatabaseMetaData#getSQLStateType</li>
</ol>
<p/>
It is strongly recommended that specific Dialect implementations override this
method, since interpretation of a SQL error is much more accurate when based on
the a vendor-specific ErrorCode rather than the SQLState.
<p/>
Specific Dialects may override to return whatever is most appropriate for that vendor.
buildSQLExceptionConversionDelegate
in class Dialect
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
Dialect
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning ResultSet
by position. Pre-Java 8, registering such ResultSet-returning
parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
registerResultSetOutParameter
in class Dialect
statement
- The callable statement.col
- The bind position at which to register the output param.SQLException
- Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
Dialect
Given a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.
getResultSet
in class Dialect
ps
- The callable statement.SQLException
- Indicates problems extracting the result set.public boolean supportsPooledSequences()
Dialect
Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?
supportsPooledSequences
in class Dialect
Dialect.getCreateSequenceStrings(String, int, int)
,
Dialect.getCreateSequenceString(String, int, int)
protected String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize)
only necessary for postgre < 7.4 See http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_sequence.sgml <p/>
Overloaded form of Dialect.getCreateSequenceString(String)
, additionally
taking the initial value and increment size to be applied to the sequence
definition.
</p>
The default definition is to suffix Dialect.getCreateSequenceString(String)
with the string: " start with {initialValue} increment by {incrementSize}" where
{initialValue} and {incrementSize} are replacement placeholders. Generally
dialects should only need to override this method if different key phrases
are used to apply the allocation information.
getCreateSequenceString
in class Dialect
sequenceName
- The name of the sequenceinitialValue
- The initial value to apply to 'create sequence' statementincrementSize
- The increment value to apply to 'create sequence' statementpublic boolean supportsEmptyInList()
Dialect
Does this dialect support empty IN lists? <p/> For example, is [where XYZ in ()] a supported construct?
supportsEmptyInList
in class Dialect
public boolean supportsExpectedLobUsagePattern()
Dialect
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. 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 Dialect
public boolean supportsLobValueChangePropogation()
Dialect
Does the dialect support propagating changes to LOB
values back to the database? Talking about mutating the
internal value of the locator as opposed to supplying a new
locator instance…
<p/>
For BLOBs, the internal value might be changed by:
Blob.setBinaryStream(long)
,
Blob.setBytes(long, byte[])
,
Blob.setBytes(long, byte[], int, int)
,
or Blob.truncate(long)
.
<p/>
For CLOBs, the internal value might be changed by:
Clob.setAsciiStream(long)
,
Clob.setCharacterStream(long)
,
Clob.setString(long, String)
,
Clob.setString(long, String, int, int)
,
or Clob.truncate(long)
.
<p/>
NOTE : I do not know the correct answer currently for
databases which (1) are not part of the cruise control process
or (2) do not Dialect.supportsExpectedLobUsagePattern()
.
supportsLobValueChangePropogation
in class Dialect
public boolean supportsUnboundedLobLocatorMaterialization()
Dialect
Is it supported to materialize a LOB locator outside the transaction in
which it was created?
<p/>
Again, part of the trickiness here is the fact that this is largely
driver dependent.
<p/>
NOTE: all database I have tested which Dialect.supportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction…
supportsUnboundedLobLocatorMaterialization
in class Dialect
public String getForUpdateString()
Dialect
Get the string to append to SELECT statements to acquire locks for this dialect.
getForUpdateString
in class Dialect
public String getWriteLockString(int timeout)
Dialect
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
getWriteLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(String aliases, int timeout)
Dialect
Get the string to append to SELECT statements to acquire WRITE locks for this dialect given the aliases of the columns to be write locked. Location of the of the returned string is treated the same as getForUpdateString.
getWriteLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(int timeout)
Dialect
Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
getReadLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(String aliases, int timeout)
Dialect
Get the string to append to SELECT statements to acquire READ locks for this dialect given the aliases of the columns to be read locked. Location of the of the returned string is treated the same as getForUpdateString.
getReadLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public boolean supportsRowValueConstructorSyntax()
Dialect
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax. <p/> Basically, does it support syntax like "… where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') …".
supportsRowValueConstructorSyntax
in class Dialect
public String getForUpdateNowaitString()
Dialect
Retrieves the <tt>FOR UPDATE NOWAIT</tt> syntax specific to this dialect.
getForUpdateNowaitString
in class Dialect
public String getForUpdateNowaitString(String aliases)
Dialect
Get the <tt>FOR UPDATE OF column_list NOWAIT</tt> fragment appropriate for this dialect given the aliases of the columns to be write locked.
getForUpdateNowaitString
in class Dialect
aliases
- The columns to be write locked.public CallableStatementSupport getCallableStatementSupport()
getCallableStatementSupport
in class Dialect
public ResultSet getResultSet(CallableStatement statement, int position) throws SQLException
Dialect
Given a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
.
getResultSet
in class Dialect
statement
- The callable statement.position
- The bind position at which to register the output param.SQLException
- Indicates problems extracting the result set.public ResultSet getResultSet(CallableStatement statement, String name) throws SQLException
Dialect
Given a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.
getResultSet
in class Dialect
statement
- The callable statement.name
- The parameter name (for drivers which support named parameters).SQLException
- Indicates problems extracting the result set.public boolean qualifyIndexName()
Dialect
Do we need to qualify index names with the schema name?
qualifyIndexName
in class Dialect
public IdentityColumnSupport getIdentityColumnSupport()
Dialect
Get the appropriate IdentityColumnSupport
getIdentityColumnSupport
in class Dialect
public boolean supportsNationalizedTypes()
Dialect
Does this dialect supports Nationalized Types
supportsNationalizedTypes
in class Dialect
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.