类 AbstractHANADialect

    • 构造器详细资料

      • AbstractHANADialect

        public AbstractHANADialect()
    • 方法详细资料

      • bindLimitParametersInReverseOrder

        public boolean bindLimitParametersInReverseOrder()
        从类复制的说明: Dialect
        ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. Does this dialect require us to bind the parameters in reverse order?
        覆盖:
        bindLimitParametersInReverseOrder 在类中 Dialect
        返回:
        true if the correct order is limit, offset
      • buildSQLExceptionConversionDelegate

        public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
        从类复制的说明: Dialect
        Build an instance of a SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.

        When Dialect.buildSQLExceptionConverter() returns null, the default SQLExceptionConverter is used to interpret SQLState and error codes. If this method is overridden to return a non-null value, the default SQLExceptionConverter will use the returned SQLExceptionConversionDelegate in addition to the following standard delegates:

        1. a "static" delegate based on the JDBC 4 defined SQLException hierarchy;
        2. a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType

        It is strongly recommended that specific Dialect implementations override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific ErrorCode rather than the SQLState.

        Specific Dialects may override to return whatever is most appropriate for that vendor.

        覆盖:
        buildSQLExceptionConversionDelegate 在类中 Dialect
        返回:
        The SQLExceptionConversionDelegate for this dialect
      • forUpdateOfColumns

        public boolean forUpdateOfColumns()
        从类复制的说明: Dialect
        Is FOR UPDATE OF syntax supported?
        覆盖:
        forUpdateOfColumns 在类中 Dialect
        返回:
        True if the database supports FOR UPDATE OF syntax; false otherwise.
      • getAddColumnString

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

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

        protected String getCreateSequenceString​(String sequenceName,
                                                 int initialValue,
                                                 int incrementSize)
                                          throws MappingException
        从类复制的说明: Dialect
        Overloaded form of Dialect.getCreateSequenceString(String), additionally taking the initial value and increment size to be applied to the sequence definition.

        The default definition is to suffix Dialect.getCreateSequenceString(String) with the string: " start with {initialValue} increment by {incrementSize}" where {initialValue} and {incrementSize} are replacement placeholders. Generally dialects should only need to override this method if different key phrases are used to apply the allocation information.
        覆盖:
        getCreateSequenceString 在类中 Dialect
        参数:
        sequenceName - The name of the sequence
        initialValue - The initial value to apply to 'create sequence' statement
        incrementSize - The increment value to apply to 'create sequence' statement
        返回:
        The sequence creation command
        抛出:
        MappingException - If sequences are not supported.
      • getCurrentTimestampSelectString

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

        public String getForUpdateString​(String aliases)
        从类复制的说明: Dialect
        Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
        覆盖:
        getForUpdateString 在类中 Dialect
        参数:
        aliases - The columns to be write locked.
        返回:
        The appropriate FOR UPDATE OF column_list clause string.
      • getForUpdateString

        public String getForUpdateString​(String aliases,
                                         LockOptions lockOptions)
        从类复制的说明: Dialect
        Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
        覆盖:
        getForUpdateString 在类中 Dialect
        参数:
        aliases - The columns to be write locked.
        lockOptions - the lock options to apply
        返回:
        The appropriate FOR UPDATE OF column_list clause string.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString()
        从类复制的说明: Dialect
        Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
        覆盖:
        getForUpdateNowaitString 在类中 Dialect
        返回:
        The appropriate FOR UPDATE NOWAIT clause string.
      • 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
      • getNotExpression

        public String getNotExpression​(String expression)
        从类复制的说明: Dialect
        Negate an expression
        覆盖:
        getNotExpression 在类中 Dialect
        参数:
        expression - The expression to negate
        返回:
        The negated expression
      • 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
      • 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.
      • registerHanaKeywords

        protected void registerHanaKeywords()
      • defaultScrollMode

        public ScrollMode defaultScrollMode()
        从类复制的说明: Dialect
        Certain dialects support a subset of ScrollModes. Provide a default to be used by Criteria and Query.
        覆盖:
        defaultScrollMode 在类中 Dialect
        返回:
        ScrollMode
      • supportsColumnCheck

        public boolean supportsColumnCheck()
        HANA currently does not support check constraints.
        覆盖:
        supportsColumnCheck 在类中 Dialect
        返回:
        True if column-level CHECK constraints are supported; false otherwise.
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        从类复制的说明: Dialect
        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.
      • 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.
      • supportsExistsInSelect

        public boolean supportsExistsInSelect()
        从类复制的说明: Dialect
        Does the dialect support an exists statement in the select clause?
        覆盖:
        supportsExistsInSelect 在类中 Dialect
        返回:
        True if exists checks are allowed in the select clause; false otherwise.
      • supportsExpectedLobUsagePattern

        public boolean supportsExpectedLobUsagePattern()
        从类复制的说明: Dialect
        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...

        Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...

        覆盖:
        supportsExpectedLobUsagePattern 在类中 Dialect
        返回:
        True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
      • supportsUnboundedLobLocatorMaterialization

        public boolean supportsUnboundedLobLocatorMaterialization()
        从类复制的说明: Dialect
        Is it supported to materialize a LOB locator outside the transaction in which it was created?

        Again, part of the trickiness here is the fact that this is largely driver dependent.

        NOTE: all database I have tested which Dialect.supportsExpectedLobUsagePattern() also support the ability to materialize a LOB outside the owning transaction...

        覆盖:
        supportsUnboundedLobLocatorMaterialization 在类中 Dialect
        返回:
        True if unbounded materialization is supported; false otherwise.
      • 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.
      • supportsSequences

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

        public boolean supportsTableCheck()
        从类复制的说明: Dialect
        Does this dialect support table-level check constraints?
        覆盖:
        supportsTableCheck 在类中 Dialect
        返回:
        True if table-level CHECK constraints are supported; false otherwise.
      • 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.
      • 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.
      • 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.
      • supportsRowValueConstructorSyntax

        public boolean supportsRowValueConstructorSyntax()
        从类复制的说明: Dialect
        Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.

        Basically, does it support syntax like "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...".

        覆盖:
        supportsRowValueConstructorSyntax 在类中 Dialect
        返回:
        True if this SQL dialect is known to support "row value constructor" syntax; false otherwise.
      • supportsRowValueConstructorSyntaxInInList

        public boolean supportsRowValueConstructorSyntaxInInList()
        从类复制的说明: Dialect
        If the dialect supports row values, does it offer such support in IN lists as well?

        For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."

        覆盖:
        supportsRowValueConstructorSyntaxInInList 在类中 Dialect
        返回:
        True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.
      • getMaxAliasLength

        public int getMaxAliasLength()
        从类复制的说明: Dialect
        What is the maximum length Hibernate can use for generated aliases?

        The maximum here should account for the fact that Hibernate often needs to append "uniqueing" information to the end of generated aliases. That "uniqueing" information will be added to the end of a identifier generated to the length specified here; so be sure to leave some room (generally speaking 5 positions will suffice).

        覆盖:
        getMaxAliasLength 在类中 Dialect
        返回:
        The maximum length.
      • getLimitHandler

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

        public String getSelectGUIDString()
        从类复制的说明: Dialect
        Get the command used to select a GUID from the underlying database.

        Optional operation.

        覆盖:
        getSelectGUIDString 在类中 Dialect
        返回:
        The appropriate command.
      • getForUpdateNowaitString

        public String getForUpdateNowaitString​(String aliases)
        从类复制的说明: Dialect
        Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.
        覆盖:
        getForUpdateNowaitString 在类中 Dialect
        参数:
        aliases - The columns to be write locked.
        返回:
        The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.
      • getReadLockString

        public String getReadLockString​(int timeout)
        从类复制的说明: Dialect
        Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.
        覆盖:
        getReadLockString 在类中 Dialect
        参数:
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        返回:
        The appropriate LOCK clause string.
      • getReadLockString

        public String getReadLockString​(String aliases,
                                        int timeout)
        从类复制的说明: Dialect
        Get the string to append to SELECT statements to acquire READ locks for this dialect given the aliases of the columns to be read locked. Location of the returned string is treated the same as getForUpdateString.
        覆盖:
        getReadLockString 在类中 Dialect
        参数:
        aliases - The columns to be read locked.
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        返回:
        The appropriate LOCK clause string.
      • getWriteLockString

        public String getWriteLockString​(int timeout)
        从类复制的说明: Dialect
        Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.
        覆盖:
        getWriteLockString 在类中 Dialect
        参数:
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        返回:
        The appropriate LOCK clause string.
      • getWriteLockString

        public String getWriteLockString​(String aliases,
                                         int timeout)
        从类复制的说明: Dialect
        Get the string to append to SELECT statements to acquire WRITE locks for this dialect given the aliases of the columns to be write locked. Location of the of the returned string is treated the same as getForUpdateString.
        覆盖:
        getWriteLockString 在类中 Dialect
        参数:
        aliases - The columns to be read locked.
        timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.
        返回:
        The appropriate LOCK clause string.
      • getQueryHintString

        public String getQueryHintString​(String query,
                                         List<String> hints)
        从类复制的说明: Dialect
        Apply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.
        覆盖:
        getQueryHintString 在类中 Dialect
        参数:
        query - The query to which to apply the hint.
        hints - The hints to apply
        返回:
        The modified SQL
      • getTableComment

        public String getTableComment​(String comment)
        从类复制的说明: Dialect
        Get the comment into a form supported for table definition.
        覆盖:
        getTableComment 在类中 Dialect
        参数:
        comment - The comment to apply
        返回:
        The comment fragment
      • getColumnComment

        public String getColumnComment​(String comment)
        从类复制的说明: Dialect
        Get the comment into a form supported for column definition.
        覆盖:
        getColumnComment 在类中 Dialect
        参数:
        comment - The comment to apply
        返回:
        The comment fragment
      • supportsCommentOn

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

        public boolean supportsPartitionBy()
        从类复制的说明: Dialect
        Does the underlying database support partition by
        覆盖:
        supportsPartitionBy 在类中 Dialect
        返回:
        boolean
      • contributeTypes

        public void contributeTypes​(TypeContributions typeContributions,
                                    ServiceRegistry serviceRegistry)
        从类复制的说明: Dialect
        Allows the Dialect to contribute additional types
        覆盖:
        contributeTypes 在类中 Dialect
        参数:
        typeContributions - Callback to contribute the types
        serviceRegistry - The service registry
      • 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.
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(CallableStatement statement,
                                                 int position)
                                          throws SQLException
        从类复制的说明: Dialect
        Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
        覆盖:
        registerResultSetOutParameter 在类中 Dialect
        参数:
        statement - The callable statement.
        position - The bind position at which to register the output param.
        返回:
        The number of (contiguous) bind positions used.
        抛出:
        SQLException - Indicates problems registering the param.
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(CallableStatement statement,
                                                 String name)
                                          throws SQLException
        从类复制的说明: Dialect
        Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by name*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
        覆盖:
        registerResultSetOutParameter 在类中 Dialect
        参数:
        statement - The callable statement.
        name - The parameter name (for drivers which support named parameters).
        返回:
        The number of (contiguous) bind positions used.
        抛出:
        SQLException - Indicates problems registering the param.
      • supportsNoWait

        public boolean supportsNoWait()
        从类复制的说明: Dialect
        Does this dialect/database support NO_WAIT timeout.
        覆盖:
        supportsNoWait 在类中 Dialect
        返回:
        true if NO_WAIT is supported
      • supportsNoColumnsInsert

        public boolean supportsNoColumnsInsert()
        从类复制的说明: Dialect
        Check if the INSERT statement is allowed to contain no column.
        覆盖:
        supportsNoColumnsInsert 在类中 Dialect
        返回:
        if the Dialect supports no-column INSERT.