For discussion of BLOB support in Postgres, as of 8.4, have a peek at http://jdbc.postgresql.org/documentation/84/binary-data.html. For the effects in regards to Hibernate see http://in.relation.to/15492.lace
| Modifier and Type | Field and Description |
|---|---|
| private static ViolatedConstraintNameExtracter | EXTRACTER
Constraint-name extractor for Postgres contraint violation exceptions.
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | bindLimitParametersInReverseOrder()
Overrides org. |
| public boolean | dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
| public String | getAddColumnString()
The syntax used to add a column to a table (optional).
|
| public String | getCascadeConstraintsString()
Overrides org. |
| public String | getCreateSequenceString(String
The name of the sequence sequenceName)Overrides org. |
| protected String | getCreateSequenceString(String
The name of the sequence sequenceName, int The initial value to apply to 'create sequence' statement initialValue, int The increment value to apply to 'create sequence' statement incrementSize)Overrides org. getCreateSequenceString(String), additionally
taking the initial value and increment size to be applied to the sequence
definition.
|
| public String | getCreateTemporaryTablePostfix()
Overrides org. |
| public String | getCreateTemporaryTableString()
Overrides org. |
| public String | getCurrentTimestampSelectString()
Overrides org. |
| public String | getDropSequenceString(String
The name of the sequence sequenceName)Overrides org. |
| public String | getForUpdateString(String
The columns to be write locked. aliases)
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
| public String | getForUpdateString()
Get the string to append to SELECT statements to acquire locks
for this dialect.
|
| public String | getIdentityColumnString(int
The type)java. type code.Overrides org. |
| public String | getIdentitySelectString(String
The table into which the insert was done table, String The PK column. column, int The type)java. type code.Overrides org. |
| public String | getLimitString(String
The query to which to apply the limit. sql, boolean Is the query requesting an offset? hasOffset)Overrides org. |
| public Class | getNativeIdentifierGeneratorClass()
Overrides org. org.)
which acts as this dialects native generation strategy.
|
| public String | getNoColumnsInsertString()
Overrides org. |
| public String | getQuerySequencesString()
Overrides org. |
| public String | getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait. timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
| public ResultSet | getResultSet(CallableStatement
The callable statement. ps)Overrides org. registerResultSetOutParameter,
extract the java. from the OUT parameter.
|
| public String | getSelectClauseNullString(int
The sqlType)java. type code.Overrides org. |
| public String | getSelectSequenceNextValString(String
the name of the sequence sequenceName)Overrides org. |
| public String | getSequenceNextValString(String
the name of the sequence sequenceName)Overrides org. |
| public ViolatedConstraintNameExtracter | |
| public String | getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait. timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
| public boolean | hasDataTypeInIdentityColumn()
Overrides org. |
| public boolean | isCurrentTimestampSelectStringCallable()
Overrides org. getCurrentTimestampSelectString
be treated as callable.
|
| public int | registerResultSetOutParameter(CallableStatement
The callable statement. statement, int The bind position at which to register the OUT param. col)Overrides org. java..
|
| public boolean | |
| public boolean | supportsCurrentTimestampSelection()
Overrides org. |
| public boolean | supportsEmptyInList()
Overrides org. |
| public boolean | supportsExpectedLobUsagePattern()
Overrides org. |
| public boolean | supportsIdentityColumns()
Overrides org. |
| public boolean | supportsLimit()
Overrides org. |
| public boolean | supportsLobValueChangePropogation()
Overrides org. |
| public boolean | supportsOuterJoinForUpdate()
Overrides org. |
| public boolean | supportsPooledSequences()
Overrides org. |
| public boolean | supportsSequences()
Does this dialect support sequences?
|
| public boolean | supportsTemporaryTables()
Overrides org. |
| public boolean | supportsTupleDistinctCounts()
Overrides org. |
| public boolean | supportsUnboundedLobLocatorMaterialization()
Overrides org. |
| public boolean | supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
| public String | toBooleanValueString(boolean
The boolean value bool)Overrides org. |
| public boolean | useInputStreamToInsertBlob()
Overrides org. java.).
|
| EXTRACTER | back to summary |
|---|---|
| private static ViolatedConstraintNameExtracter EXTRACTER Hides org. Constraint-name extractor for Postgres contraint violation exceptions. Orginally contributed by Denny Bartelt. | |
| PostgreSQLDialect | back to summary |
|---|---|
| public PostgreSQLDialect() | |
| bindLimitParametersInReverseOrder | back to summary |
|---|---|
| public boolean bindLimitParametersInReverseOrder() Overrides org. Doc from org. 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?
| |
| dropConstraints | back to summary |
|---|---|
| public boolean dropConstraints() Overrides org. Doc from org. Do we need to drop constraints before dropping tables in this dialect?
| |
| getAddColumnString | back to summary |
|---|---|
| public String getAddColumnString() Overrides org. Doc from org. The syntax used to add a column to a table (optional).
| |
| getCascadeConstraintsString | back to summary |
|---|---|
| public String getCascadeConstraintsString() Overrides org. Doc from org. Completely optional cascading drop clause
| |
| getCreateSequenceString | back to summary |
|---|---|
| public String getCreateSequenceString(String sequenceName) Overrides org. Doc from org. Typically dialects which support sequences can create a sequence
with a single command. This is convenience form of
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 | |
| getCreateSequenceString | back to summary |
|---|---|
| protected String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize) Overrides org. Doc from org. Overloaded form of 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.
| |
| getCreateTemporaryTablePostfix | back to summary |
|---|---|
| public String getCreateTemporaryTablePostfix() Overrides org. Doc from org. Get any fragments needing to be postfixed to the command for temporary table creation.
| |
| getCreateTemporaryTableString | back to summary |
|---|---|
| public String getCreateTemporaryTableString() Overrides org. Doc from org. Command used to create a temporary table.
| |
| getCurrentTimestampSelectString | back to summary |
|---|---|
| public String getCurrentTimestampSelectString() Overrides org. Doc from org. Retrieve the command used to retrieve the current timestamp from the database.
| |
| getDropSequenceString | back to summary |
|---|---|
| public String getDropSequenceString(String sequenceName) Overrides org. Doc from org. Typically dialects which support sequences can drop a sequence
with a single command. This is convenience form of
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 | |
| getForUpdateString | back to summary |
|---|---|
| public String getForUpdateString(String aliases) Overrides org. Doc from org. Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked. | |
| getForUpdateString | back to summary |
|---|---|
| public String getForUpdateString() Overrides org. Doc from org. Get the string to append to SELECT statements to acquire locks for this dialect.
| |
| getIdentityColumnString | back to summary |
|---|---|
| public String getIdentityColumnString(int type) Overrides org. Doc from org. The syntax used during DDL to define a column as being an IDENTITY of a particular type.
| |
| getIdentitySelectString | back to summary |
|---|---|
| public String getIdentitySelectString(String table, String column, int type) Overrides org. Doc from org. Get the select command to use to retrieve the last generated IDENTITY value for a particular table
| |
| getLimitString | back to summary |
|---|---|
| public String getLimitString(String sql, boolean hasOffset) Overrides org. Doc from org. Apply s limit clause to the query.
Typically dialects utilize
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
| |
| getNativeIdentifierGeneratorClass | back to summary |
|---|---|
| public Class Overrides org. Doc from org. The class (which implements Comes into play whenever the user specifies the native generator.
| |
| getNoColumnsInsertString | back to summary |
|---|---|
| public String getNoColumnsInsertString() Overrides org. Doc from org. The fragment used to insert a row without specifying any column values. This is not possible on some databases.
| |
| getQuerySequencesString | back to summary |
|---|---|
| public String getQuerySequencesString() Overrides org. Doc from org. Get the select command used retrieve the names of all sequences.
| |
| getReadLockString | back to summary |
|---|---|
| public String getReadLockString(int timeout) Overrides org. Doc from org. 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.
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet(CallableStatement ps) throws SQLException Overrides org. Doc from org. Given a callable statement previously processed by
| |
| getSelectClauseNullString | back to summary |
|---|---|
| public String getSelectClauseNullString(int sqlType) Overrides org. Workaround for postgres bug #1453
| |
| getSelectSequenceNextValString | back to summary |
|---|---|
| public String getSelectSequenceNextValString(String sequenceName) Overrides org. Doc from org. Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
This differs from | |
| getSequenceNextValString | back to summary |
|---|---|
| public String getSequenceNextValString(String sequenceName) Overrides org. Doc from org. Generate the appropriate select statement to to retrieve the next value of a sequence. This should be a "stand alone" select statement. | |
| getViolatedConstraintNameExtracter | back to summary |
|---|---|
| public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter() Overrides org. | |
| getWriteLockString | back to summary |
|---|---|
| public String getWriteLockString(int timeout) Overrides org. Doc from org. 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.
| |
| hasDataTypeInIdentityColumn | back to summary |
|---|---|
| public boolean hasDataTypeInIdentityColumn() Overrides org. Doc from org. Whether this dialect have an Identity clause added to the data type or a completely separate identity data type
| |
| isCurrentTimestampSelectStringCallable | back to summary |
|---|---|
| public boolean isCurrentTimestampSelectStringCallable() Overrides org. Doc from org. Should the value returned by
| |
| registerResultSetOutParameter | back to summary |
|---|---|
| public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException Overrides org. Doc from org. Registers an OUT parameter which will be returning a
| |
| supportsCommentOn | back to summary |
|---|---|
| public boolean supportsCommentOn() | |
| supportsCurrentTimestampSelection | back to summary |
|---|---|
| public boolean supportsCurrentTimestampSelection() Overrides org. Doc from org. Does this dialect support a way to retrieve the database's current timestamp value?
| |
| supportsEmptyInList | back to summary |
|---|---|
| public boolean supportsEmptyInList() Overrides org. Doc from org. Does this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?
| |
| supportsExpectedLobUsagePattern | back to summary |
|---|---|
| public boolean supportsExpectedLobUsagePattern() Overrides org. Doc from org. 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... 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...
| |
| supportsIdentityColumns | back to summary |
|---|---|
| public boolean supportsIdentityColumns() Overrides org. Doc from org. Does this dialect support identity column key generation?
| |
| supportsLimit | back to summary |
|---|---|
| public boolean supportsLimit() Overrides org. Doc from org. Does this dialect support some form of limiting query results via a SQL clause?
| |
| supportsLobValueChangePropogation | back to summary |
|---|---|
| public boolean supportsLobValueChangePropogation() Overrides org. Doc from org. 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...
For BLOBs, the internal value might be changed by:
For CLOBs, the internal value might be changed by:
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
| |
| supportsOuterJoinForUpdate | back to summary |
|---|---|
| public boolean supportsOuterJoinForUpdate() Overrides org. Doc from org. Does this dialect support FOR UPDATE in conjunction with outer joined rows?
| |
| supportsPooledSequences | back to summary |
|---|---|
| public boolean supportsPooledSequences() Overrides org. Doc from org. Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?
| |
| supportsSequences | back to summary |
|---|---|
| public boolean supportsSequences() Overrides org. Doc from org. Does this dialect support sequences?
| |
| supportsTemporaryTables | back to summary |
|---|---|
| public boolean supportsTemporaryTables() Overrides org. Doc from org. Does this dialect support temporary tables?
| |
| supportsTupleDistinctCounts | back to summary |
|---|---|
| public boolean supportsTupleDistinctCounts() Overrides org. Doc from org. Does this dialect support `count(distinct a,b)`?
| |
| supportsUnboundedLobLocatorMaterialization | back to summary |
|---|---|
| public boolean supportsUnboundedLobLocatorMaterialization() Overrides org. Doc from org. Is it supported to materialize a LOB locator outside the transaction in which it was created? Again, part of the trickiness here is the fact that this is largely driver dependent. Note all database I have tested which
| |
| supportsUnionAll | back to summary |
|---|---|
| public boolean supportsUnionAll() Overrides org. Doc from org. Does this dialect support UNION ALL, which is generally a faster variant of UNION?
| |
| toBooleanValueString | back to summary |
|---|---|
| public String toBooleanValueString(boolean bool) Overrides org. Doc from org. The SQL literal value to which this database maps boolean values.
| |
| useInputStreamToInsertBlob | back to summary |
|---|---|
| public boolean useInputStreamToInsertBlob() Overrides org. Doc from org. Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
| |