public class

MimerSQLDialect

extends Dialect
java.lang.Object
   ↳ org.hibernate.dialect.Dialect
     ↳ org.hibernate.dialect.MimerSQLDialect

Class Overview

An Hibernate 3 SQL dialect for Mimer SQL. This dialect requires Mimer SQL 9.2.1 or later because of the mappings to NCLOB, BINARY, and BINARY VARYING.

Summary

[Expand]
Inherited Constants
From class org.hibernate.dialect.Dialect
Public Constructors
MimerSQLDialect()
Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs).
Public Methods
boolean dropConstraints()
We do not have to drop constraints before we drop the table
boolean forUpdateOfColumns()
Does the FOR UPDATE OF syntax specify particular columns?
String getAddColumnString()
The syntax used to add a column to a table
String getCascadeConstraintsString()
The syntax for using cascade on constraints
String getCreateSequenceString(String sequenceName)
The syntax used to create a sequence.
String getDropSequenceString(String sequenceName)
The syntax used to drop sequences
String getQuerySequencesString()
The syntax for fetching all sequnces avialable in the current schema.
String getSequenceNextValString(String sequenceName)
The syntax used to get the next value of a sequence in Mimer SQL
boolean supportsForUpdate()
Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets.
boolean supportsIdentityColumns()
TODO: Check if Mimer SQL cannot handle the way DB2 does
boolean supportsLimit()
Mimer SQL does not support limit
boolean supportsOuterJoinForUpdate()
For now, simply return false since we don't updatable result sets.
boolean supportsSequences()
Mimer SQL supports sequences
[Expand]
Inherited Methods
From class org.hibernate.dialect.Dialect
From class java.lang.Object

Public Constructors

public MimerSQLDialect ()

Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs). To avoid breaking the limit all the time we limit the length of the character columns to CHAR_MAX_LENTH, NATIONAL_CHAR_LENGTH for national characters, and BINARY_MAX_LENGTH for binary types.

Public Methods

public boolean dropConstraints ()

We do not have to drop constraints before we drop the table

Returns
  • True if constraints must be dropped prior to dropping the table; false otherwise.

public boolean forUpdateOfColumns ()

Does the FOR UPDATE OF syntax specify particular columns?

Returns
  • True if the database supports FOR UPDATE OF syntax; false otherwise.

public String getAddColumnString ()

The syntax used to add a column to a table

Returns
  • The "add column" fragment.

public String getCascadeConstraintsString ()

The syntax for using cascade on constraints

Returns
  • String

public String getCreateSequenceString (String sequenceName)

The syntax used to create a sequence. Since we presume the sequences will be used as keys, we make them unique.

Parameters
sequenceName The name of the sequence
Returns
  • The sequence creation command

public String getDropSequenceString (String sequenceName)

The syntax used to drop sequences

Parameters
sequenceName The name of the sequence
Returns
  • The sequence drop commands

public String getQuerySequencesString ()

The syntax for fetching all sequnces avialable in the current schema.

Returns
  • The select command; or null if sequences are not supported.

public String getSequenceNextValString (String sequenceName)

The syntax used to get the next value of a sequence in Mimer SQL

Parameters
sequenceName the name of the sequence
Returns
  • String The "nextval" select string.

public boolean supportsForUpdate ()

Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets. Otherwise, Mimer SQL actually supports the for update syntax.

Returns
  • boolean

public boolean supportsIdentityColumns ()

TODO: Check if Mimer SQL cannot handle the way DB2 does

Returns
  • True if IDENTITY columns are supported; false otherwise.

public boolean supportsLimit ()

Mimer SQL does not support limit

Returns
  • True if this dialect supports some form of LIMIT.

public boolean supportsOuterJoinForUpdate ()

For now, simply return false since we don't updatable result sets.

Returns
  • True if outer joined rows can be locked via FOR UPDATE.

public boolean supportsSequences ()

Mimer SQL supports sequences

Returns
  • boolean