Class Oracle9iDialect

Direct Known Subclasses:
Oracle10gDialect

public class Oracle9iDialect extends Oracle8iDialect
A dialect for Oracle 9i databases.

Unlike the older (deprecated) Oracle9Dialect, this version specifies to not use "ANSI join syntax" because 9i does not seem to properly handle it in all cases.

  • Constructor Details

    • Oracle9iDialect

      public Oracle9iDialect()
  • Method Details

    • registerCharacterTypeMappings

      protected void registerCharacterTypeMappings()
      Overrides:
      registerCharacterTypeMappings in class Oracle8iDialect
    • registerDateTimeTypeMappings

      protected void registerDateTimeTypeMappings()
      Overrides:
      registerDateTimeTypeMappings in class Oracle8iDialect
    • createCaseFragment

      public CaseFragment createCaseFragment()
      Description copied from class: Oracle8iDialect
      Map case support to the Oracle DECODE function. Oracle did not add support for CASE until 9i.
      Overrides:
      createCaseFragment in class Oracle8iDialect
      Returns:
      The oracle CASE -> DECODE fragment
    • getLimitString

      public String getLimitString(String sql, boolean hasOffset)
      Description copied from class: Dialect
      Apply s limit clause to the query.

      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.

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

      Overrides:
      getLimitString in class Oracle8iDialect
      Parameters:
      sql - The query to which to apply the limit.
      hasOffset - Is the query requesting an offset?
      Returns:
      the modified SQL
    • getSelectClauseNullString

      public String getSelectClauseNullString(int sqlType)
      Description copied from class: Dialect
      Given a Types type code, determine an appropriate null value to use in a select clause.

      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.

      Overrides:
      getSelectClauseNullString in class Oracle8iDialect
      Parameters:
      sqlType - The Types type code.
      Returns:
      The appropriate select clause value fragment.
    • getCurrentTimestampSelectString

      public String getCurrentTimestampSelectString()
      Description copied from class: Dialect
      Retrieve the command used to retrieve the current timestamp from the database.
      Overrides:
      getCurrentTimestampSelectString in class Oracle8iDialect
      Returns:
      The command.
    • getCurrentTimestampSQLFunctionName

      public String getCurrentTimestampSQLFunctionName()
      Description copied from class: Dialect
      The name of the database-specific SQL function for retrieving the current timestamp.
      Overrides:
      getCurrentTimestampSQLFunctionName in class Oracle8iDialect
      Returns:
      The function name.
    • getForUpdateString

      public String getForUpdateString()
      Description copied from class: Dialect
      Get the string to append to SELECT statements to acquire locks for this dialect.
      Overrides:
      getForUpdateString in class Dialect
      Returns:
      The appropriate FOR UPDATE clause string.
    • getWriteLockString

      public String getWriteLockString(int timeout)
      Description copied from class: 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.
      Overrides:
      getWriteLockString in class Dialect
      Parameters:
      timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
      Returns:
      The appropriate LOCK clause string.
    • getReadLockString

      public String getReadLockString(int timeout)
      Description copied from class: 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.
      Overrides:
      getReadLockString in class Dialect
      Parameters:
      timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
      Returns:
      The appropriate LOCK clause string.
    • supportsRowValueConstructorSyntaxInInList

      public boolean supportsRowValueConstructorSyntaxInInList()
      HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this method here. Reopen this issue if you found/know 8 supports it.
      Overrides:
      supportsRowValueConstructorSyntaxInInList in class Dialect
      Returns:
      True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.
    • supportsTupleDistinctCounts

      public boolean supportsTupleDistinctCounts()
      Description copied from class: Dialect
      Does this dialect support `count(distinct a,b)`?
      Overrides:
      supportsTupleDistinctCounts in class Dialect
      Returns:
      True if the database supports counting disintct tuples; false otherwise.