Class MimerSQLDialect

  • All Implemented Interfaces:
    ConversionContext

    public class MimerSQLDialect
    extends Dialect
    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.
    • Constructor Detail

      • MimerSQLDialect

        public MimerSQLDialect()
        Even though Mimer SQL supports character and binary columns up to 15 000 in length, this is also the maximum width of the table (excluding 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.
    • Method Detail

      • getAddColumnString

        public java.lang.String getAddColumnString()
        Description copied from class: Dialect
        The syntax used to add a column to a table (optional).
        Overrides:
        getAddColumnString in class Dialect
        Returns:
        The "add column" fragment.
      • dropConstraints

        public boolean dropConstraints()
        Description copied from class: Dialect
        Do we need to drop constraints before dropping tables in this dialect?
        Overrides:
        dropConstraints in class Dialect
        Returns:
        True if constraints must be dropped prior to dropping the table; false otherwise.
      • supportsSequences

        public boolean supportsSequences()
        Description copied from class: Dialect
        Does this dialect support sequences?
        Overrides:
        supportsSequences in class Dialect
        Returns:
        True if sequences supported; false otherwise.
      • getSequenceNextValString

        public java.lang.String getSequenceNextValString​(java.lang.String sequenceName)
        Description copied from class: Dialect
        Generate the appropriate select statement to to retrieve the next value of a sequence.

        This should be a "stand alone" select statement.

        Overrides:
        getSequenceNextValString in class Dialect
        Parameters:
        sequenceName - the name of the sequence
        Returns:
        String The "nextval" select string.
      • getCreateSequenceString

        public java.lang.String getCreateSequenceString​(java.lang.String sequenceName)
        Description copied from class: 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.

        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).

        Overrides:
        getCreateSequenceString in class Dialect
        Parameters:
        sequenceName - The name of the sequence
        Returns:
        The sequence creation command
      • getDropSequenceString

        public java.lang.String getDropSequenceString​(java.lang.String sequenceName)
        Description copied from class: 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.

        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).

        Overrides:
        getDropSequenceString in class Dialect
        Parameters:
        sequenceName - The name of the sequence
        Returns:
        The sequence drop commands
      • supportsLimit

        public boolean supportsLimit()
        Description copied from class: Dialect
        Does this dialect support some form of limiting query results via a SQL clause?
        Overrides:
        supportsLimit in class Dialect
        Returns:
        True if this dialect supports some form of LIMIT.
      • getCascadeConstraintsString

        public java.lang.String getCascadeConstraintsString()
        Description copied from class: Dialect
        Completely optional cascading drop clause
        Overrides:
        getCascadeConstraintsString in class Dialect
        Returns:
        String
      • getQuerySequencesString

        public java.lang.String getQuerySequencesString()
        Description copied from class: Dialect
        Get the select command used retrieve the names of all sequences.
        Overrides:
        getQuerySequencesString in class Dialect
        Returns:
        The select command; or null if sequences are not supported.
        See Also:
        SchemaUpdate
      • forUpdateOfColumns

        public boolean forUpdateOfColumns()
        Description copied from class: Dialect
        Is FOR UPDATE OF syntax supported?
        Overrides:
        forUpdateOfColumns in class Dialect
        Returns:
        True if the database supports FOR UPDATE OF syntax; false otherwise.
      • supportsOuterJoinForUpdate

        public boolean supportsOuterJoinForUpdate()
        Description copied from class: Dialect
        Does this dialect support FOR UPDATE in conjunction with outer joined rows?
        Overrides:
        supportsOuterJoinForUpdate in class Dialect
        Returns:
        True if outer joined rows can be locked via FOR UPDATE.