|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.Dialect org.hibernate.dialect.PostgreSQLDialect
public class PostgreSQLDialect
An SQL dialect for Postgres
Field Summary |
---|
Fields inherited from class org.hibernate.dialect.Dialect |
---|
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE |
Constructor Summary | |
---|---|
PostgreSQLDialect()
|
Method Summary | |
---|---|
boolean |
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. |
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 |
getCascadeConstraintsString()
Completely optional cascading drop clause |
String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence with a single command. |
String |
getCreateTemporaryTablePostfix()
Get any fragments needing to be postfixed to the command for temporary table creation. |
String |
getCreateTemporaryTableString()
Command used to create a temporary table. |
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestammp from the database. |
String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command. |
String |
getForUpdateString(String aliases)
Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked. |
String |
getIdentityColumnString(int type)
The syntax used during DDL to define a column as being an IDENTITY of a particular type. |
String |
getIdentitySelectString(String table,
String column,
int type)
Get the select command to use to retrieve the last generated IDENTITY value for a particuar table |
String |
getLimitString(String sql,
boolean hasOffset)
Apply s limit clause to the query. |
Class |
getNativeIdentifierGeneratorClass()
The class (which implements IdentifierGenerator )
which acts as this dialects native generation strategy. |
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 |
getSelectClauseNullString(int sqlType)
Workaround for postgres bug #1453 |
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retreive the next value of a sequence as part of another (typically DML) statement. |
String |
getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retreive the next value of a sequence. |
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter()
|
boolean |
hasDataTypeInIdentityColumn()
Whether this dialect have an Identity clause added to the data type or a completely seperate identity data type |
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
supportsCommentOn()
|
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? 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... |
boolean |
supportsIdentityColumns()
Does this dialect support identity column key generation? |
boolean |
supportsLimit()
Does this dialect support some form of limiting query results via a SQL clause? |
boolean |
supportsOuterJoinForUpdate()
Does this dialect support FOR UPDATE in conjunction with outer joined rows? |
boolean |
supportsSequences()
Does this dialect support sequences? |
boolean |
supportsTemporaryTables()
Does this dialect support temporary tables? |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PostgreSQLDialect()
Method Detail |
---|
public String getAddColumnString()
Dialect
getAddColumnString
in class Dialect
public String getSequenceNextValString(String sequenceName)
Dialect
getSequenceNextValString
in class Dialect
sequenceName
- the name of the sequence
public String getSelectSequenceNextValString(String sequenceName)
Dialect
Dialect.getSequenceNextValString(String)
in that this
should return an expression usable within another statement.
getSelectSequenceNextValString
in class Dialect
sequenceName
- the name of the sequence
public String getCreateSequenceString(String sequenceName)
Dialect
Dialect.getCreateSequenceStrings(java.lang.String)
to help facilitate that.
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 sequence
public String getDropSequenceString(String sequenceName)
Dialect
Dialect.getDropSequenceStrings(java.lang.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(java.lang.String)
.
getDropSequenceString
in class Dialect
sequenceName
- The name of the sequence
public String getCascadeConstraintsString()
Dialect
getCascadeConstraintsString
in class Dialect
public boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public boolean supportsLimit()
Dialect
supportsLimit
in class Dialect
public String getLimitString(String sql, boolean hasOffset)
Dialect
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)
.
getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?
public boolean bindLimitParametersInReverseOrder()
Dialect
bindLimitParametersInReverseOrder
in class Dialect
public boolean supportsIdentityColumns()
Dialect
supportsIdentityColumns
in class Dialect
public String getForUpdateString(String aliases)
Dialect
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.
public String getIdentitySelectString(String table, String column, int type)
Dialect
getIdentitySelectString
in class Dialect
table
- The table into which the insert was donecolumn
- The PK column.type
- The Types
type code.
public String getIdentityColumnString(int type)
Dialect
getIdentityColumnString
in class Dialect
type
- The Types
type code.
public boolean hasDataTypeInIdentityColumn()
Dialect
hasDataTypeInIdentityColumn
in class Dialect
public String getNoColumnsInsertString()
Dialect
getNoColumnsInsertString
in class Dialect
public Class getNativeIdentifierGeneratorClass()
Dialect
IdentifierGenerator
)
which acts as this dialects native generation strategy.
Comes into play whenever the user specifies the native generator.
getNativeIdentifierGeneratorClass
in class Dialect
public boolean supportsOuterJoinForUpdate()
Dialect
supportsOuterJoinForUpdate
in class Dialect
public boolean useInputStreamToInsertBlob()
Dialect
PreparedStatement.setBinaryStream(int, java.io.InputStream, int)
).
useInputStreamToInsertBlob
in class Dialect
public boolean supportsUnionAll()
Dialect
supportsUnionAll
in class Dialect
public String getSelectClauseNullString(int sqlType)
getSelectClauseNullString
in class Dialect
sqlType
- The Types
type code.
public boolean supportsCommentOn()
supportsCommentOn
in class Dialect
public boolean supportsTemporaryTables()
Dialect
supportsTemporaryTables
in class Dialect
public String getCreateTemporaryTableString()
Dialect
getCreateTemporaryTableString
in class Dialect
public String getCreateTemporaryTablePostfix()
Dialect
getCreateTemporaryTablePostfix
in class Dialect
public boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection
in class Dialect
public boolean isCurrentTimestampSelectStringCallable()
Dialect
Dialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
sytnax is being used...
isCurrentTimestampSelectStringCallable
in class Dialect
Dialect.getCurrentTimestampSelectString()
return
is callable; false otherwise.public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString
in class Dialect
public String toBooleanValueString(boolean bool)
Dialect
toBooleanValueString
in class Dialect
bool
- The boolean value
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter
in class Dialect
public boolean supportsEmptyInList()
Dialect
supportsEmptyInList
in class Dialect
public boolean supportsExpectedLobUsagePattern()
Dialect
supportsExpectedLobUsagePattern
in class Dialect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |