类 HSQLDialect

  • 所有已实现的接口:
    ConversionContext

    public class HSQLDialect
    extends Dialect
    An SQL dialect compatible with HSQLDB (HyperSQL).

    Note this version supports HSQLDB version 1.8 and higher, only.

    Enhancements to version 3.5.0 GA to provide basic support for both HSQLDB 1.8.x and 2.x Does not works with Hibernate 3.2 - 3.4 without alteration.

    作者:
    Christoph Sturm, Phillip Baird, Fred Toussi
    • 构造器详细资料

      • HSQLDialect

        public HSQLDialect()
        Constructs a HSQLDialect
    • 方法详细资料

      • getAddColumnString

        public String getAddColumnString()
        从类复制的说明: Dialect
        The syntax used to add a column to a table (optional).
        覆盖:
        getAddColumnString 在类中 Dialect
        返回:
        The "add column" fragment.
      • supportsLockTimeouts

        public boolean supportsLockTimeouts()
        从类复制的说明: Dialect
        Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
        覆盖:
        supportsLockTimeouts 在类中 Dialect
        返回:
        True is this dialect supports specifying lock timeouts.
      • getForUpdateString

        public String getForUpdateString()
        从类复制的说明: Dialect
        Get the string to append to SELECT statements to acquire locks for this dialect.
        覆盖:
        getForUpdateString 在类中 Dialect
        返回:
        The appropriate FOR UPDATE clause string.
      • getLimitHandler

        public LimitHandler getLimitHandler()
        从类复制的说明: Dialect
        Returns the delegate managing LIMIT clause.
        覆盖:
        getLimitHandler 在类中 Dialect
        返回:
        LIMIT clause delegate.
      • supportsLimit

        public boolean supportsLimit()
        从类复制的说明: Dialect
        Does this dialect support some form of limiting query results via a SQL clause?
        覆盖:
        supportsLimit 在类中 Dialect
        返回:
        True if this dialect supports some form of LIMIT.
      • getLimitString

        public String getLimitString​(String sql,
                                     boolean hasOffset)
        从类复制的说明: Dialect
        Apply a 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 offset 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 在类中 Dialect
        参数:
        sql - The query to which to apply the limit.
        hasOffset - Is the query requesting an offset?
        返回:
        the modified SQL
      • bindLimitParametersFirst

        public boolean bindLimitParametersFirst()
        从类复制的说明: Dialect
        Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
        覆盖:
        bindLimitParametersFirst 在类中 Dialect
        返回:
        true if limit parameters should come before other parameters
      • supportsIfExistsAfterTableName

        public boolean supportsIfExistsAfterTableName()
        从类复制的说明: Dialect
        For dropping a table, can the phrase "if exists" be applied after the table name?

        NOTE : Only one or the other (or neither) of this and Dialect.supportsIfExistsBeforeTableName() should return true

        覆盖:
        supportsIfExistsAfterTableName 在类中 Dialect
        返回:
        true if the "if exists" can be applied after the table name
      • supportsIfExistsBeforeTableName

        public boolean supportsIfExistsBeforeTableName()
        从类复制的说明: Dialect
        For dropping a table, can the phrase "if exists" be applied before the table name?

        NOTE : Only one or the other (or neither) of this and Dialect.supportsIfExistsAfterTableName() should return true

        覆盖:
        supportsIfExistsBeforeTableName 在类中 Dialect
        返回:
        true if the "if exists" can be applied before the table name
      • supportsColumnCheck

        public boolean supportsColumnCheck()
        从类复制的说明: Dialect
        Does this dialect support column-level check constraints?
        覆盖:
        supportsColumnCheck 在类中 Dialect
        返回:
        True if column-level CHECK constraints are supported; false otherwise.
      • supportsSequences

        public boolean supportsSequences()
        从类复制的说明: Dialect
        Does this dialect support sequences?
        覆盖:
        supportsSequences 在类中 Dialect
        返回:
        True if sequences supported; false otherwise.
      • getCreateSequenceString

        protected String getCreateSequenceString​(String sequenceName)
        HSQL will start with 0, by default. In order for Hibernate to know that this not transient, manually start with 1.
        覆盖:
        getCreateSequenceString 在类中 Dialect
        参数:
        sequenceName - The name of the sequence
        返回:
        The sequence creation command
      • getSelectSequenceNextValString

        public String getSelectSequenceNextValString​(String sequenceName)
        从类复制的说明: Dialect
        Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.

        This differs from Dialect.getSequenceNextValString(String) in that this should return an expression usable within another statement.

        覆盖:
        getSelectSequenceNextValString 在类中 Dialect
        参数:
        sequenceName - the name of the sequence
        返回:
        The "nextval" fragment.
      • getSequenceNextValString

        public String getSequenceNextValString​(String sequenceName)
        从类复制的说明: Dialect
        Generate the appropriate select statement to to retrieve the next value of a sequence.

        This should be a "stand alone" select statement.

        覆盖:
        getSequenceNextValString 在类中 Dialect
        参数:
        sequenceName - the name of the sequence
        返回:
        String The "nextval" select string.
      • getQuerySequencesString

        public String getQuerySequencesString()
        从类复制的说明: Dialect
        Get the select command used retrieve the names of all sequences.
        覆盖:
        getQuerySequencesString 在类中 Dialect
        返回:
        The select command; or null if sequences are not supported.
        另请参阅:
        SchemaUpdate
      • getSelectClauseNullString

        public String getSelectClauseNullString​(int sqlType)
        从类复制的说明: 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.

        覆盖:
        getSelectClauseNullString 在类中 Dialect
        参数:
        sqlType - The Types type code.
        返回:
        The appropriate select clause value fragment.
      • supportsUnionAll

        public boolean supportsUnionAll()
        从类复制的说明: Dialect
        Does this dialect support UNION ALL, which is generally a faster variant of UNION?
        覆盖:
        supportsUnionAll 在类中 Dialect
        返回:
        True if UNION ALL is supported; false otherwise.
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        HSQLDB 1.8.x requires CALL CURRENT_TIMESTAMP but this should not be treated as a callable statement. It is equivalent to "select current_timestamp from dual" in some databases. HSQLDB 2.0 also supports VALUES CURRENT_TIMESTAMP

        Does this dialect support a way to retrieve the database's current timestamp value?

        覆盖:
        supportsCurrentTimestampSelection 在类中 Dialect
        返回:
        True if the current timestamp can be retrieved; false otherwise.
      • getCurrentTimestampSelectString

        public String getCurrentTimestampSelectString()
        从类复制的说明: Dialect
        Retrieve the command used to retrieve the current timestamp from the database.
        覆盖:
        getCurrentTimestampSelectString 在类中 Dialect
        返回:
        The command.
      • getCurrentTimestampSQLFunctionName

        public String getCurrentTimestampSQLFunctionName()
        从类复制的说明: Dialect
        The name of the database-specific SQL function for retrieving the current timestamp.
        覆盖:
        getCurrentTimestampSQLFunctionName 在类中 Dialect
        返回:
        The function name.
      • getLockingStrategy

        public LockingStrategy getLockingStrategy​(Lockable lockable,
                                                  LockMode lockMode)
        For HSQLDB 2.0, this is a copy of the base class implementation. For HSQLDB 1.8, only READ_UNCOMMITTED is supported.

        Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.

        覆盖:
        getLockingStrategy 在类中 Dialect
        参数:
        lockable - The persister for the entity to be locked.
        lockMode - The type of lock to be acquired.
        返回:
        The appropriate locking strategy.
      • supportsCommentOn

        public boolean supportsCommentOn()
        从类复制的说明: Dialect
        Does this dialect/database support commenting on tables, columns, etc?
        覆盖:
        supportsCommentOn 在类中 Dialect
        返回:
        true if commenting is supported
      • supportsEmptyInList

        public boolean supportsEmptyInList()
        从类复制的说明: Dialect
        Does this dialect support empty IN lists?

        For example, is [where XYZ in ()] a supported construct?

        覆盖:
        supportsEmptyInList 在类中 Dialect
        返回:
        True if empty in lists are supported; false otherwise.
      • requiresCastingOfParametersInSelectClause

        public boolean requiresCastingOfParametersInSelectClause()
        从类复制的说明: Dialect
        Does this dialect require that parameters appearing in the SELECT clause be wrapped in cast() calls to tell the db parser the expected type.
        覆盖:
        requiresCastingOfParametersInSelectClause 在类中 Dialect
        返回:
        True if select clause parameter must be cast()ed
      • doesReadCommittedCauseWritersToBlockReaders

        public boolean doesReadCommittedCauseWritersToBlockReaders()
        从类复制的说明: Dialect
        For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
        覆盖:
        doesReadCommittedCauseWritersToBlockReaders 在类中 Dialect
        返回:
        True if writers block readers to achieve READ_COMMITTED; false otherwise.
      • doesRepeatableReadCauseReadersToBlockWriters

        public boolean doesRepeatableReadCauseReadersToBlockWriters()
        从类复制的说明: Dialect
        For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
        覆盖:
        doesRepeatableReadCauseReadersToBlockWriters 在类中 Dialect
        返回:
        True if readers block writers to achieve REPEATABLE_READ; false otherwise.
      • toBooleanValueString

        public String toBooleanValueString​(boolean bool)
        从类复制的说明: Dialect
        The SQL literal value to which this database maps boolean values.
        覆盖:
        toBooleanValueString 在类中 Dialect
        参数:
        bool - The boolean value
        返回:
        The appropriate SQL literal.
      • supportsTupleDistinctCounts

        public boolean supportsTupleDistinctCounts()
        从类复制的说明: Dialect
        Does this dialect support `count(distinct a,b)`?
        覆盖:
        supportsTupleDistinctCounts 在类中 Dialect
        返回:
        True if the database supports counting distinct tuples; false otherwise.
      • supportsNamedParameters

        public boolean supportsNamedParameters​(DatabaseMetaData databaseMetaData)
                                        throws SQLException
        从类复制的说明: Dialect
        Override the DatabaseMetaData#supportsNamedParameters()
        覆盖:
        supportsNamedParameters 在类中 Dialect
        返回:
        boolean
        抛出:
        SQLException - Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.
      • dropConstraints

        public boolean dropConstraints()
        从类复制的说明: Dialect
        Do we need to drop constraints before dropping tables in this dialect?
        覆盖:
        dropConstraints 在类中 Dialect
        返回:
        True if constraints must be dropped prior to dropping the table; false otherwise.